2
0
mirror of https://github.com/hibiken/asynq.git synced 2024-11-14 11:31:18 +08:00

Delete "pending_since" under task-key when state changes to active

This commit is contained in:
Ken Hibino 2021-12-11 06:42:47 -08:00
parent 99a6750656
commit 22e6c9d297

View File

@ -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])