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

13 lines
332 B
Lua

--[[
Functions to destructure job key.
Just a bit of warning, these functions may be a bit slow and affect performance significantly.
]]
local getJobIdFromKey = function (jobKey)
return string.match(jobKey, ".*:(.*)")
end
local getJobKeyPrefix = function (jobKey, jobId)
return string.sub(jobKey, 0, #jobKey - #jobId)
end