mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
add comment about ZPOPMIN
This commit is contained in:
parent
a709a0adaa
commit
ba35c73cb6
1 changed files with 1 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue