class Cloudtasker::UniqueJob::ConflictStrategy::Reschedule
This strategy reschedules the job on conflict. This strategy can only be used with processing locks (e.g. while_executing).
Constants
- RESCHEDULE_DELAY
Public Instance Methods
on_execute()
click to toggle source
Reschedule
the job.
# File lib/cloudtasker/unique_job/conflict_strategy/reschedule.rb, line 24 def on_execute job.worker.reenqueue(RESCHEDULE_DELAY) end
on_schedule() { || ... }
click to toggle source
A conflict on schedule means that this strategy is being used with a lock scheduling strategy (e.g. until_executed) instead of a processing strategy (e.g. while_executing). In this case we let the scheduling happen as it does not make sense to reschedule in this context.
# File lib/cloudtasker/unique_job/conflict_strategy/reschedule.rb, line 17 def on_schedule yield end