Sha256: ee66dd149f4d2138265245a0bf0b44a60b33d6e091e43c8e48a960893f73272a
Contents?: true
Size: 413 Bytes
Versions: 5
Compression:
Stored size: 413 Bytes
Contents
local queue = KEYS[1] local in_flight_key = KEYS[2] local now = tonumber(ARGV[1]) 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]*', '') redis.call('lpush', queue, job) redis.call('del', in_flight_key) return { queue, job }
Version data entries
5 entries across 5 versions & 1 rubygems