Fix ZRANGE arguments in get_items.lua
This commit is contained in:
parent
d31ddb72f3
commit
20902df122
|
@ -8,4 +8,12 @@ if locked then
|
||||||
return {}
|
return {}
|
||||||
end
|
end
|
||||||
|
|
||||||
return redis.call("ZRANGE", queueKey, 0, limit, "WITHSCORES")
|
-- The range is inclusive
|
||||||
|
local min = 0
|
||||||
|
local max = limit - 1
|
||||||
|
|
||||||
|
if max < 0 then
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
|
||||||
|
return redis.call("ZRANGE", queueKey, min, max, "WITHSCORES")
|
||||||
|
|
Loading…
Reference in New Issue