mirror of
https://github.com/HDT3213/delayqueue.git
synced 2025-10-03 14:26:27 +08:00
fix redis nil in lua
Redis Nil bulk reply and Nil multi bulk reply -> Lua false boolean type
This commit is contained in:
@@ -361,7 +361,7 @@ local unack2retry = function(msgs)
|
||||
local retryCounts = redis.call('HMGet', KEYS[2], unpack(msgs)) -- get retry count
|
||||
for i,v in ipairs(retryCounts) do
|
||||
local k = msgs[i]
|
||||
if v ~= nil and v ~= '' and tonumber(v) > 0 then
|
||||
if v ~= false and v ~= nil and v ~= '' and tonumber(v) > 0 then
|
||||
redis.call("HIncrBy", KEYS[2], k, -1) -- reduce retry count
|
||||
redis.call("LPush", KEYS[3], k) -- add to retry
|
||||
else
|
||||
|
Reference in New Issue
Block a user