Sha256: 80c5c44063d369dc798b3552b28cdf581cde12095832a37514a0a1cf2296ced8

Contents?: true

Size: 340 Bytes

Versions: 8

Compression:

Stored size: 340 Bytes

Contents

local unique_key     = KEYS[1]
local time           = ARGV[1]

if redis.pcall('set', unique_key, time + 60, 'nx', 'ex', 60) then
  return 1
end

local stored_time = redis.pcall('get', unique_key)
if stored_time and stored_time < time then
  if redis.pcall('set', unique_key, time + 60, 'xx', 'ex', 60) then
    return 1
  end
end

return 0

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-4.0.15 redis/synchronize.lua
sidekiq-unique-jobs-4.0.13 redis/synchronize.lua
sidekiq-unique-jobs-4.0.12 redis/synchronize.lua
sidekiq-unique-jobs-4.0.11 redis/synchronize.lua
sidekiq-unique-jobs-4.0.10 redis/synchronize.lua
sidekiq-unique-jobs-4.0.9 redis/synchronize.lua
sidekiq-unique-jobs-4.0.8 redis/synchronize.lua
sidekiq-unique-jobs-4.0.7 redis/synchronize.lua