mirror of
https://github.com/hibiken/asynq.git
synced 2024-12-27 16:13:40 +08:00
Delete "pending_since" under task-key when state changes to active
This commit is contained in:
parent
99a6750656
commit
22e6c9d297
@ -232,6 +232,7 @@ if redis.call("EXISTS", KEYS[2]) == 0 then
|
|||||||
if id then
|
if id then
|
||||||
local key = ARGV[2] .. id
|
local key = ARGV[2] .. id
|
||||||
redis.call("HSET", key, "state", "active")
|
redis.call("HSET", key, "state", "active")
|
||||||
|
redis.call("HDEL", key, "pending_since")
|
||||||
local data = redis.call("HMGET", key, "msg", "timeout", "deadline")
|
local data = redis.call("HMGET", key, "msg", "timeout", "deadline")
|
||||||
local msg = data[1]
|
local msg = data[1]
|
||||||
local timeout = tonumber(data[2])
|
local timeout = tonumber(data[2])
|
||||||
|
Loading…
Reference in New Issue
Block a user