From 7bf0d9608d805d739e32863da4a3aea69acd9916 Mon Sep 17 00:00:00 2001 From: roggervalf Date: Wed, 4 Dec 2024 00:20:16 -0600 Subject: [PATCH] chore: replace cid in favor of chkey --- src/commands/includes/moveParentFromWaitingChildrenToFailed.lua | 2 +- src/commands/includes/removeJob.lua | 2 +- src/commands/moveStalledJobsToWait-9.lua | 2 +- src/commands/removeJob-2.lua | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commands/includes/moveParentFromWaitingChildrenToFailed.lua b/src/commands/includes/moveParentFromWaitingChildrenToFailed.lua index 34bba955a4..3f47b6aefc 100644 --- a/src/commands/includes/moveParentFromWaitingChildrenToFailed.lua +++ b/src/commands/includes/moveParentFromWaitingChildrenToFailed.lua @@ -18,7 +18,7 @@ local function moveParentFromWaitingChildrenToFailed( parentQueueKey, parentKey, rcall("XADD", parentQueueKey .. ":events", "*", "event", "failed", "jobId", parentId, "failedReason", failedReason, "prev", "waiting-children") - local jobAttributes = rcall("HMGET", parentKey, "parent", "deid", "opts", "cid") + local jobAttributes = rcall("HMGET", parentKey, "parent", "deid", "opts", "chkey") removeDeduplicationKeyIfNeeded(parentQueuePrefix, jobAttributes[2]) removeChainKeyIfNeeded(jobAttributes[4], parentKey) diff --git a/src/commands/includes/removeJob.lua b/src/commands/includes/removeJob.lua index 5ad5755760..68d2ef1c6e 100644 --- a/src/commands/includes/removeJob.lua +++ b/src/commands/includes/removeJob.lua @@ -14,6 +14,6 @@ local function removeJob(jobId, hard, baseKey, shouldRemoveDeduplicationKey) if shouldRemoveDeduplicationKey then removeDeduplicationKey(baseKey, jobKey) end - removeChainKeyIfNeeded(rcall("HGET", jobKey, "cid"), jobKey) + removeChainKeyIfNeeded(rcall("HGET", jobKey, "chkey"), jobKey) removeJobKeys(jobKey) end diff --git a/src/commands/moveStalledJobsToWait-9.lua b/src/commands/moveStalledJobsToWait-9.lua index a7bbefcb3c..86d50292ae 100644 --- a/src/commands/moveStalledJobsToWait-9.lua +++ b/src/commands/moveStalledJobsToWait-9.lua @@ -81,7 +81,7 @@ if (#stalling > 0) then local stalledCount = rcall("HINCRBY", jobKey, "stalledCounter", 1) if (stalledCount > maxStalledJobCount) then - local jobAttributes = rcall("HMGET", jobKey, "opts", "parent", "deid", "cid") + local jobAttributes = rcall("HMGET", jobKey, "opts", "parent", "deid", "chkey") local rawOpts = jobAttributes[1] local rawParentData = jobAttributes[2] local opts = cjson.decode(rawOpts) diff --git a/src/commands/removeJob-2.lua b/src/commands/removeJob-2.lua index cf06d226d6..0d684324d5 100644 --- a/src/commands/removeJob-2.lua +++ b/src/commands/removeJob-2.lua @@ -69,7 +69,7 @@ local function removeJob(prefix, jobId, parentKey, removeChildren) local prev = removeJobFromAnyState(prefix, jobId) removeDeduplicationKey(prefix, jobKey) - removeChainKeyIfNeeded(rcall("HGET", jobKey, "cid"), jobKey) + removeChainKeyIfNeeded(rcall("HGET", jobKey, "chkey"), jobKey) if removeJobKeys(jobKey) > 0 then local maxEvents = getOrSetMaxEvents(KEYS[2]) rcall("XADD", prefix .. "events", "MAXLEN", "~", maxEvents, "*", "event", "removed", "jobId", jobId, "prev",