Class: SidekiqUniqueJobs::Lock::UntilExecuting
- Inherits:
-
UntilExecuted
- Object
- UntilExecuted
- SidekiqUniqueJobs::Lock::UntilExecuting
- Defined in:
- lib/sidekiq_unique_jobs/lock/until_executing.rb
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from UntilExecuted
#after_yield_yield, #initialize, #lock, #max_lock_time, #unique_key, #unlock
Methods included from Unlockable
after_unlock, logger, unlock, unlock_by_arguments, unlock_by_jid, unlock_by_key
Constructor Details
This class inherits a constructor from SidekiqUniqueJobs::Lock::UntilExecuted
Instance Method Details
#execute(callback, &_block) ⇒ Object
4 5 6 7 |
# File 'lib/sidekiq_unique_jobs/lock/until_executing.rb', line 4 def execute(callback, &_block) callback.call if unlock(:server) yield end |