mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-09 00:59:02 +02:00
add comment about ZPOPMIN
This commit is contained in:
@@ -305,6 +305,7 @@ module.exports = RedisManager =
|
||||
return callback() if !reply?.length # return if no projects ready to be processed
|
||||
# pop the oldest entry (get and remove in a multi)
|
||||
multi = rclient.multi()
|
||||
# Poor man's version of ZPOPMIN, which is only available in Redis 5.
|
||||
multi.zrange keys.flushAndDeleteQueue(), 0, 0, "WITHSCORES"
|
||||
multi.zremrangebyrank keys.flushAndDeleteQueue(), 0, 0
|
||||
multi.zcard keys.flushAndDeleteQueue() # the total length of the queue (for metrics)
|
||||
|
||||
Reference in New Issue
Block a user