|
|
@ -206,10 +206,10 @@ class Queue(object):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
pipe.watch(depends_on.key)
|
|
|
|
pipe.watch(depends_on.key)
|
|
|
|
|
|
|
|
|
|
|
|
# If the dependency does not exist, we raise an
|
|
|
|
# If the dependency does not exist, raise an
|
|
|
|
# exception. So the caller is able to avoid an orphaned
|
|
|
|
# exception to avoid creating an orphaned job.
|
|
|
|
# job.
|
|
|
|
if not self.job_class.exists(depends_on.id,
|
|
|
|
if not self.job_class.exists(depends_on.id):
|
|
|
|
self.connection):
|
|
|
|
raise InvalidJobDependency('Job {0} does not exist'.format(depends_on.id))
|
|
|
|
raise InvalidJobDependency('Job {0} does not exist'.format(depends_on.id))
|
|
|
|
|
|
|
|
|
|
|
|
if depends_on.get_status() != JobStatus.FINISHED:
|
|
|
|
if depends_on.get_status() != JobStatus.FINISHED:
|
|
|
|