2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-10-22 22:06:12 +08:00

Fix AggregationCheck with unlimited size to clear group name from

all-groups set
This commit is contained in:
Ken Hibino
2022-03-15 17:03:09 -07:00
parent 1998ca80ea
commit bfd0980d7a
2 changed files with 36 additions and 3 deletions

View File

@@ -1048,7 +1048,7 @@ if maxDelay ~= 0 then
end
redis.call("ZREMRANGEBYRANK", KEYS[1], 0, maxSize-1)
redis.call("ZADD", KEYS[3], ARGV[4], KEYS[2])
if size <= maxSize then
if size <= maxSize or maxSize == 0 then
redis.call("SREM", KEYS[4], ARGV[6])
end
return 1
@@ -1064,7 +1064,7 @@ if latestEntryScore <= gracePeriodStartTime then
end
redis.call("ZREMRANGEBYRANK", KEYS[1], 0, maxSize-1)
redis.call("ZADD", KEYS[3], ARGV[4], KEYS[2])
if size <= maxSize then
if size <= maxSize or maxSize == 0 then
redis.call("SREM", KEYS[4], ARGV[6])
end
return 1