Sha256: daf2bb6469a7cd9c96b467f6e440a690f19d7e2c275d893c7c9765d13b86a172

Contents?: true

Size: 349 Bytes

Versions: 10

Compression:

Stored size: 349 Bytes

Contents

local grabbed_key   = KEYS[1]
local unique_digest = KEYS[2]

local job_id = ARGV[1]
local current_time = tonumber(ARGV[2])

local old_token  = redis.call('GET', unique_digest)
if old_token then
  if old_token == job_id or old_token == '2' then
    redis.call('DEL', unique_digest)
    redis.call('HSET', grabbed_key, job_id, current_time)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-6.0.25 redis/convert_legacy_lock.lua
sidekiq-unique-jobs-6.0.24 redis/convert_legacy_lock.lua
sidekiq-unique-jobs-6.0.23 redis/convert_legacy_lock.lua
sidekiq-unique-jobs-6.0.22 redis/convert_legacy_lock.lua
sidekiq-unique-jobs-6.0.21 redis/convert_legacy_lock.lua
sidekiq-unique-jobs-6.0.20 redis/convert_legacy_lock.lua
sidekiq-unique-jobs-6.0.16 redis/convert_legacy_lock.lua
sidekiq-unique-jobs-6.0.19 redis/convert_legacy_lock.lua
sidekiq-unique-jobs-6.0.13 redis/convert_legacy_lock.lua
sidekiq-unique-jobs-6.0.12 redis/convert_legacy_lock.lua