Class: EmbargoExpiryJob
- Inherits:
-
Hyrax::ApplicationJob
- Object
- ApplicationJob
- Hyrax::ApplicationJob
- EmbargoExpiryJob
- Defined in:
- app/jobs/embargo_expiry_job.rb
Instance Method Summary collapse
- #perform ⇒ Object
-
#records_with_expired_embargos ⇒ Enumerator<String>
Ids for all the objects that have expired active embargoes.
Instance Method Details
#perform ⇒ Object
3 4 5 6 7 8 |
# File 'app/jobs/embargo_expiry_job.rb', line 3 def perform .each do |id| work = ActiveFedora::Base.find(id) Hyrax::Actors::EmbargoActor.new(work).destroy end end |
#records_with_expired_embargos ⇒ Enumerator<String>
Returns ids for all the objects that have expired active embargoes.
12 13 14 |
# File 'app/jobs/embargo_expiry_job.rb', line 12 def Hyrax::EmbargoService..map(&:id) end |