Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DeferMove = redis.NewScript(
2,
`local refs = redis.call("zrangebyscore", KEYS[1], 0, ARGV[1])
if table.getn(refs) > 0 then
redis.call("lpush", KEYS[2], unpack(refs))
redis.call("zremrangebyscore", KEYS[1], 0, ARGV[1])
end
return refs`)
Move tasks from a deferred zset to the todo simpleq
View Source
var RecurPull = redis.NewScript(
1,
`local refs = redis.call("zrangebyscore", KEYS[1], 0, ARGV[1])
for i,ref in pairs(refs) do
local tref, interval = string.match(ref, "([^|]*)|([0-9]+)")
redis.call("zincrby", KEYS[1], interval, ref)
refs[i] = tref
end
return refs`)
Pull recurring tasks out of their zset Get their intervals and update the next processing time
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.