instantiate a job instead of fetch

this removes the need for the depended on job.id already being saved
This commit is contained in:
Travis Johnson 2014-11-18 12:09:14 -05:00
parent 786d3c5887
commit af4b0436c1
1 changed files with 1 additions and 1 deletions

View File

@ -190,7 +190,7 @@ class Queue(object):
# modifying the dependency. In this case we simply retry
if depends_on is not None:
if not isinstance(depends_on, self.job_class):
depends_on = Job.fetch(id=depends_on, connection=self.connection)
depends_on = Job(id=depends_on, connection=self.connection)
with self.connection.pipeline() as pipe:
while True:
try: