Method: MasterLock::RedisLock#initialize
- Defined in:
- lib/master_lock/redis_lock.rb
#initialize(redis:, key:, owner:, ttl:, sleep_interval: DEFAULT_SLEEP_INTERVAL) ⇒ RedisLock
Returns a new instance of RedisLock.
25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/master_lock/redis_lock.rb', line 25 def initialize( redis:, key:, owner:, ttl:, sleep_interval: DEFAULT_SLEEP_INTERVAL ) @redis = redis @key = key @owner = owner @ttl = ttl @sleep_interval = sleep_interval end |