Sha256: b25f71fd3092e81ac97a8b21496945a0f4877b4c91bc751efaf13a45d2c60b80

Contents?: true

Size: 340 Bytes

Versions: 1

Compression:

Stored size: 340 Bytes

Contents

local queue = KEYS[1]
local flight = KEYS[2]
local expire_at = tonumber(ARGV[1])

local job = redis.call('lpop', queue)
if (not job) then return nil end
job = job:sub(1,-2)..',"expire_at":'..expire_at.."}"

local flight_key = flight..queue..':'..string.match(job, '"jid":"([^"]*)"')
redis.call('set', flight_key, job)
return { queue, job }

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
atomic-sidekiq-1.0.0 lib/atomic_sidekiq/atomic_operation/lua_scripts/retrieve.lua