Sha256: ccc474383a43dfa4811668d5c397d20aef5df89f6159c493f3e32ffc16bda177
Contents?: true
Size: 469 Bytes
Versions: 2
Compression:
Stored size: 469 Bytes
Contents
local queue = KEYS[1] local in_flight_key = KEYS[2] local now = tonumber(ARGV[1]) local recover = ARGV[2] == 'true' local job = redis.call('get', in_flight_key) if (not job) then return nil end local expiration = tonumber(string.match(job, '"expire_at":([0-9]*)')) if expiration > now then return nil end job = string.gsub(job, ',?"expire_at":[0-9]*', '') if recover then redis.call('lpush', queue, job) end redis.call('del', in_flight_key) return { queue, job }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
atomic-sidekiq-1.3.0 | lib/atomic_sidekiq/atomic_operation/lua_scripts/expire.lua |
atomic-sidekiq-1.2.0 | lib/atomic_sidekiq/atomic_operation/lua_scripts/expire.lua |