Projektstart
This commit is contained in:
12
backend/node_modules/bullmq/dist/cjs/commands/includes/destructureJobKey.lua
generated
vendored
Normal file
12
backend/node_modules/bullmq/dist/cjs/commands/includes/destructureJobKey.lua
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
--[[
|
||||
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
|
||||
Reference in New Issue
Block a user