Fix dependent jobs enqueueing (#1145)

If Queue was subclassed and enqueue_job changed, these changes should affect on dependent jobs' enqueueing too.
main
Ivan Piskunov 5 years ago committed by Selwin Ong
parent e43bce4467
commit cfc02816ea

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

Loading…
Cancel
Save