lib/cloudtasker/unique_job/lock/until_executing.rb in cloudtasker-0.13.2 vs lib/cloudtasker/unique_job/lock/until_executing.rb in cloudtasker-0.14.rc1
- old
+ new
@@ -8,14 +8,14 @@
class UntilExecuting < BaseLock
#
# Acquire a lock for the job and trigger a conflict
# if the lock could not be acquired.
#
- def schedule
+ def schedule(&block)
job.lock!
yield
rescue LockError
- conflict_instance.on_schedule { yield }
+ conflict_instance.on_schedule(&block)
end
#
# Release the lock and perform the job.
#