feat: move `reorder_queues` to `dequeue_job` (#1853)

* feat: move `reorder_queues` to `dequeue_job`

* Update worker.py
This commit is contained in:
lowercase00 2023-03-06 21:44:47 -03:00 committed by GitHub
parent 5de8cda1f9
commit 82a59e9791
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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: