2
0
mirror of https://github.com/hibiken/asynq.git synced 2024-12-27 00:02:19 +08:00

Fix redis script error

This commit is contained in:
Ken Hibino 2023-01-02 13:17:18 -08:00
parent 0b8cfad703
commit bafed907e9

View File

@ -379,7 +379,7 @@ if redis.call("ZREM", KEYS[2], ARGV[1]) == 0 then
return redis.error_reply("NOT FOUND") return redis.error_reply("NOT FOUND")
end end
if redis.call("ZADD", KEYS[3], ARGV[3], ARGV[1]) ~= 1 then if redis.call("ZADD", KEYS[3], ARGV[3], ARGV[1]) ~= 1 then
redis.redis.error_reply("INTERNAL") return redis.error_reply("INTERNAL")
end end
redis.call("HSET", KEYS[4], "msg", ARGV[4], "state", "completed") redis.call("HSET", KEYS[4], "msg", ARGV[4], "state", "completed")
local n = redis.call("INCR", KEYS[5]) local n = redis.call("INCR", KEYS[5])
@ -416,7 +416,7 @@ if redis.call("ZREM", KEYS[2], ARGV[1]) == 0 then
return redis.error_reply("NOT FOUND") return redis.error_reply("NOT FOUND")
end end
if redis.call("ZADD", KEYS[3], ARGV[3], ARGV[1]) ~= 1 then if redis.call("ZADD", KEYS[3], ARGV[3], ARGV[1]) ~= 1 then
redis.redis.error_reply("INTERNAL") return redis.error_reply("INTERNAL")
end end
redis.call("HSET", KEYS[4], "msg", ARGV[4], "state", "completed") redis.call("HSET", KEYS[4], "msg", ARGV[4], "state", "completed")
local n = redis.call("INCR", KEYS[5]) local n = redis.call("INCR", KEYS[5])