Class: Resque::Scheduler::Lock::Basic
- Defined in:
- lib/resque/scheduler/lock/basic.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#initialize, #release, #release!, #value
Constructor Details
This class inherits a constructor from Resque::Scheduler::Lock::Base
Instance Method Details
#acquire! ⇒ Object
8 9 10 11 12 13 |
# File 'lib/resque/scheduler/lock/basic.rb', line 8 def acquire! if Resque.redis.setnx(key, value) extend_lock! true end end |