diff --git a/rq/queue.py b/rq/queue.py index 3fcb8a0..5027fa6 100644 --- a/rq/queue.py +++ b/rq/queue.py @@ -290,12 +290,12 @@ class Queue(object): job.timeout = self.DEFAULT_TIMEOUT job.save(pipeline=pipe) + if self._async: + self.push_job_id(job.id, pipeline=pipe, at_front=at_front) + if pipeline is None: pipe.execute() - if self._async: - self.push_job_id(job.id, at_front=at_front) - return job def enqueue_dependents(self, job, pipeline=None):