Projektstart
This commit is contained in:
11
backend/node_modules/bullmq/dist/cjs/commands/includes/updateJobFields.lua
generated
vendored
Normal file
11
backend/node_modules/bullmq/dist/cjs/commands/includes/updateJobFields.lua
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
--[[
|
||||
Function to update a bunch of fields in a job.
|
||||
]]
|
||||
local function updateJobFields(jobKey, msgpackedFields)
|
||||
if msgpackedFields and #msgpackedFields > 0 then
|
||||
local fieldsToUpdate = cmsgpack.unpack(msgpackedFields)
|
||||
if fieldsToUpdate then
|
||||
rcall("HMSET", jobKey, unpack(fieldsToUpdate))
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user