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

* feat: move `reorder_queues` to `dequeue_job`

* Update worker.py
main
lowercase00 2 years ago committed by GitHub
parent 5de8cda1f9
commit 82a59e9791
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -830,7 +830,6 @@ class Worker:
break break
job, queue = result job, queue = result
self.reorder_queues(reference_queue=queue)
self.execute_job(job, queue) self.execute_job(job, queue)
self.heartbeat() self.heartbeat()
@ -913,6 +912,7 @@ class Worker:
) )
if result is not None: if result is not None:
job, queue = result job, queue = result
self.reorder_queues(reference_queue=queue)
self.log.debug(f"Dequeued job {blue(job.id)} from {green(queue.name)}") self.log.debug(f"Dequeued job {blue(job.id)} from {green(queue.name)}")
job.redis_server_version = self.get_redis_server_version() job.redis_server_version = self.get_redis_server_version()
if self.log_job_description: if self.log_job_description:

Loading…
Cancel
Save