Class: Angarium::DeliverJob
- Inherits:
-
ApplicationJob
- Object
- ActiveJob::Base
- ApplicationJob
- Angarium::DeliverJob
- Defined in:
- app/jobs/angarium/deliver_job.rb
Instance Method Summary collapse
-
#perform(delivery_id, _legacy_force = nil) ⇒ Object
The second positional arg is accepted only for backward compatibility with jobs enqueued by an older version (force is now persisted on the delivery as
forcedand read by #deliver!); new enqueues pass just the id.
Instance Method Details
#perform(delivery_id, _legacy_force = nil) ⇒ Object
The second positional arg is accepted only for backward compatibility with
jobs enqueued by an older version (force is now persisted on the delivery as
forced and read by #deliver!); new enqueues pass just the id.
6 7 8 9 10 11 12 |
# File 'app/jobs/angarium/deliver_job.rb', line 6 def perform(delivery_id, _legacy_force = nil) delivery = Delivery.find_by(id: delivery_id) return unless delivery return unless delivery.pending? delivery.deliver! end |