Sha256: c967894cad06be5d8618d9826590096debfe566966f20f8fb86af11a86ca918e
Contents?: true
Size: 523 Bytes
Versions: 6
Compression:
Stored size: 523 Bytes
Contents
-- Add all jobs to sorted set local eta = redis.call("ZADD", KEYS[1], unpack(ARGV)) -- Set ETA key; this is merely the number of jobs that need to be processed redis.call("SET", KEYS[3], eta) -- Queue jobs that are ready to be processed (their score is 0) and -- remove queued jobs from the sorted set local count = redis.call("ZCOUNT", KEYS[1], 0, 0) if count > 0 then local work = redis.call("ZRANGEBYSCORE", KEYS[1], 0, 0) redis.call("LPUSH", KEYS[2], unpack(work)) redis.call("ZREM", KEYS[1], unpack(work)) end
Version data entries
6 entries across 6 versions & 1 rubygems