def lock(timeout = nil, &block)
      Scripts.call(:lock, redis_pool,
                   keys: [exists_key, grabbed_key, available_key, UNIQUE_SET, unique_digest],
                   argv: [jid, ttl, lock_type])

      grab_token(timeout) do |token|
        touch_grabbed_token(token)
        return_token_or_block_value(token, &block)
      end
    end
def lock(timeout = nil, &block)
      Scripts.call(:lock, redis_pool,
                   keys: [exists_key, grabbed_key, available_key, UNIQUE_SET, unique_digest],
                   argv: [jid, ttl, lock_type])

      grab_token(timeout) do |token|
        touch_grabbed_token(token)
        return_token_or_block_value(token, &block)
      end
    end
Create a lock for the item

 @param [Integer] timeout the number of seconds to wait for a lock.

 @return [String] the Sidekiq job_id (jid)