Files
simple-mail-cleaner/backend/node_modules/bullmq/dist/esm/commands/includes/getNextDelayedTimestamp.lua
2026-01-22 15:49:12 +01:00

13 lines
328 B
Lua

--[[
Function to return the next delayed job timestamp.
]]
local function getNextDelayedTimestamp(delayedKey)
local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES")
if #result then
local nextTimestamp = tonumber(result[2])
if nextTimestamp ~= nil then
return nextTimestamp / 0x1000
end
end
end