Sha256: e0029304d47465c62d12235c76516b7b6279ede0924db1d28c3da52dc266fb30

Contents?: true

Size: 245 Bytes

Versions: 7

Compression:

Stored size: 245 Bytes

Contents

local unique_key = KEYS[1]
local job_id     = ARGV[1]
local stored_jid = redis.pcall('get', unique_key)

if stored_jid then
  if stored_jid == job_id then
    return redis.pcall('del', unique_key)
  else
    return 0
  end
else
  return -1
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-4.0.12 redis/release_lock.lua
sidekiq-unique-jobs-4.0.11 redis/release_lock.lua
sidekiq-unique-jobs-4.0.10 redis/release_lock.lua
sidekiq-unique-jobs-4.0.9 redis/release_lock.lua
sidekiq-unique-jobs-4.0.8 redis/release_lock.lua
sidekiq-unique-jobs-4.0.7 redis/release_lock.lua
sidekiq-unique-jobs-4.0.0 redis/release_lock.lua