class SidekiqUniqueJobs::Lock::BaseLock

def initialize(item, callback, redis_pool = nil)

Parameters:
  • redis_pool (Sidekiq::RedisConnection, ConnectionPool) -- the redis connection
  • callback (Proc) -- the callback to use after unlock
  • item (Hash) -- the Sidekiq job hash
def initialize(item, callback, redis_pool = nil)
  @item       = item
  @callback   = callback
  @redis_pool = redis_pool
  @attempt    = 0
  prepare_item # Used to ease testing
  @lock_config = LockConfig.new(item)
end