"Fossies" - the Fresh Open Source Software Archive

Member "Signal-Server-11.29.0/service/src/main/resources/lua/get_queues_to_persist.lua" (8 Dec 2023, 316 Bytes) of package /linux/www/Signal-Server-11.29.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Lua source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 local queueTotalIndexKey = KEYS[1]
    2 local maxTime            = ARGV[1]
    3 local limit              = ARGV[2]
    4 
    5 local results = redis.call("ZRANGEBYSCORE", queueTotalIndexKey, 0, maxTime, "LIMIT", 0, limit)
    6 
    7 if results and next(results) then
    8     redis.call("ZREM", queueTotalIndexKey, unpack(results))
    9 end
   10 
   11 return results