From 559e648b54a99f79d40b074093e65e55e645e849 Mon Sep 17 00:00:00 2001 From: roggervalf Date: Fri, 29 Mar 2024 22:55:30 -0500 Subject: [PATCH] chore: update python version --- python/bullmq/scripts.py | 10 ++++++---- src/commands/moveToActive-11.lua | 2 +- src/commands/moveToFinished-14.lua | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/python/bullmq/scripts.py b/python/bullmq/scripts.py index e44d25cd81..4cdfad69bf 100644 --- a/python/bullmq/scripts.py +++ b/python/bullmq/scripts.py @@ -47,11 +47,11 @@ def __init__(self, prefix: str, queueName: str, redisConnection: RedisConnection "moveToActive": self.redisClient.register_script(self.getScript("moveToActive-11.lua")), "moveToDelayed": self.redisClient.register_script(self.getScript("moveToDelayed-7.lua")), "moveToFinished": self.redisClient.register_script(self.getScript("moveToFinished-14.lua")), - "moveToWaitingChildren": self.redisClient.register_script(self.getScript("moveToWaitingChildren-4.lua")), + "moveToWaitingChildren": self.redisClient.register_script(self.getScript("moveToWaitingChildren-6.lua")), "obliterate": self.redisClient.register_script(self.getScript("obliterate-2.lua")), "pause": self.redisClient.register_script(self.getScript("pause-7.lua")), "promote": self.redisClient.register_script(self.getScript("promote-8.lua")), - "removeJob": self.redisClient.register_script(self.getScript("removeJob-1.lua")), + "removeJob": self.redisClient.register_script(self.getScript("removeJob-2.lua")), "reprocessJob": self.redisClient.register_script(self.getScript("reprocessJob-7.lua")), "retryJob": self.redisClient.register_script(self.getScript("retryJob-10.lua")), "moveJobsToWait": self.redisClient.register_script(self.getScript("moveJobsToWait-7.lua")), @@ -171,7 +171,9 @@ def moveToWaitingChildrenArgs(self, job_id, token, opts: dict = {}): keys = [self.toKey(job_id) + ":lock", self.keys['active'], self.keys['waiting-children'], - self.toKey(job_id)] + self.toKey(job_id), + self.keys[''], + self.keys['meta']] child_key = opts.get("child") if opts else None args = [token, get_parent_key(child_key) or "", round(time.time() * 1000), job_id, "1" if opts.get("skipAttempt") else "0"] @@ -307,7 +309,7 @@ async def promote(self, job_id: str): return None def remove(self, job_id: str, remove_children: bool): - keys = self.getKeys(['']) + keys = self.getKeys(['', 'meta']) args = [job_id, 1 if remove_children else 0] return self.commands["removeJob"](keys=keys, args=args) diff --git a/src/commands/moveToActive-11.lua b/src/commands/moveToActive-11.lua index b1e70c6e62..559a2fe8d2 100644 --- a/src/commands/moveToActive-11.lua +++ b/src/commands/moveToActive-11.lua @@ -63,7 +63,7 @@ promoteDelayedJobs(delayedKey, markerKey, target, KEYS[3], eventStreamKey, ARGV[ if paused then return {0, 0, 0, 0} end local maxJobs = tonumber(opts['limiter'] and opts['limiter']['max']) -local expireTime = getRateLimitTTL(maxJobs, rateLimiterKey, markerKey) +local expireTime = getRateLimitTTL(maxJobs, rateLimiterKey) -- Check if we are rate limited first. if expireTime > 0 then return {0, 0, expireTime, 0} end diff --git a/src/commands/moveToFinished-14.lua b/src/commands/moveToFinished-14.lua index 0393f2a63e..ac4512482a 100644 --- a/src/commands/moveToFinished-14.lua +++ b/src/commands/moveToFinished-14.lua @@ -224,7 +224,7 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists local maxJobs = tonumber(opts['limiter'] and opts['limiter']['max']) -- Check if we are rate limited first. - local expireTime = getRateLimitTTL(maxJobs, KEYS[6], KEYS[14]) + local expireTime = getRateLimitTTL(maxJobs, KEYS[6]) if expireTime > 0 then return {0, 0, expireTime, 0} end