From 82a59e9791335fcdd263fda2799aa126ddce4e90 Mon Sep 17 00:00:00 2001 From: lowercase00 <21188280+lowercase00@users.noreply.github.com> Date: Mon, 6 Mar 2023 21:44:47 -0300 Subject: [PATCH] feat: move `reorder_queues` to `dequeue_job` (#1853) * feat: move `reorder_queues` to `dequeue_job` * Update worker.py --- rq/worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rq/worker.py b/rq/worker.py index 2ccfb787..a7f96f23 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -830,7 +830,6 @@ class Worker: break job, queue = result - self.reorder_queues(reference_queue=queue) self.execute_job(job, queue) self.heartbeat() @@ -913,6 +912,7 @@ class Worker: ) if result is not None: job, queue = result + self.reorder_queues(reference_queue=queue) self.log.debug(f"Dequeued job {blue(job.id)} from {green(queue.name)}") job.redis_server_version = self.get_redis_server_version() if self.log_job_description: