From cfc02816ea9be897eac2ddd4afc794ef548b4b4b Mon Sep 17 00:00:00 2001 From: Ivan Piskunov Date: Thu, 17 Oct 2019 04:35:51 +0300 Subject: [PATCH] Fix dependent jobs enqueueing (#1145) If Queue was subclassed and enqueue_job changed, these changes should affect on dependent jobs' enqueueing too. --- rq/queue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rq/queue.py b/rq/queue.py index 64280de..e68dae0 100644 --- a/rq/queue.py +++ b/rq/queue.py @@ -398,7 +398,7 @@ class Queue(object): if dependent.origin == self.name: self.enqueue_job(dependent, pipeline=pipe) else: - queue = Queue(name=dependent.origin, connection=self.connection) + queue = self.__class__(name=dependent.origin, connection=self.connection) queue.enqueue_job(dependent, pipeline=pipe) pipe.delete(dependents_key)