Sha256: ca01b860c2a13e0ce216376de25ca8a86d15c3b0303038c0643c5a6e50320680

Contents?: true

Size: 416 Bytes

Versions: 3

Compression:

Stored size: 416 Bytes

Contents

local previously_scheduled = redis.call('HGET', KEYS[1], ARGV[1])
redis.call('HSET', KEYS[1], ARGV[1], 'true')

if previously_scheduled ~= 'true' then
    local pcb_key = KEYS[1] + '-pending_callbacks'
    redis.call('SADD', pcb_key, ARGV[1] + 'finalize')
    if ARGV[2] == 'true' then
        redis.call('SADD', pcb_key, ARGV[1])
    end
    redis.call('EXPIRE', pcb_key, ARGV[3])
end

return previously_scheduled

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
canvas_sync-0.17.8.beta3 lib/canvas_sync/job_batches/schedule_callback.lua
canvas_sync-0.17.8.beta2 lib/canvas_sync/job_batches/schedule_callback.lua
canvas_sync-0.17.8.beta1 lib/canvas_sync/job_batches/schedule_callback.lua