Skip to content

Commit

Permalink
fix(scripts): make sure jobs fields are not empty before unpack
Browse files Browse the repository at this point in the history
  • Loading branch information
manast committed Dec 14, 2024
1 parent af02061 commit 4360572
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/includes/updateJobFields.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Function to update a bunch of fields in a job.
]]
local function updateJobFields(jobKey, msgpackedFields)
if msgpackedFields then
if msgpackedFields and #msgpackedFields > 0 then
local fieldsToUpdate = cmsgpack.unpack(msgpackedFields)
if fieldsToUpdate then
redis.call("HMSET", jobKey, unpack(fieldsToUpdate))
Expand Down

0 comments on commit 4360572

Please sign in to comment.