mirror of https://github.com/rq/rq.git
pipeline calls to get dependency statuses
This commit is contained in:
parent
0b528dae4b
commit
33e4beacf4
10
rq/job.py
10
rq/job.py
|
@ -763,11 +763,11 @@ class Job(object):
|
||||||
if exclude_job_id:
|
if exclude_job_id:
|
||||||
dependencies_ids.discard(exclude_job_id)
|
dependencies_ids.discard(exclude_job_id)
|
||||||
|
|
||||||
dependencies_statuses = [
|
with connection.pipeline() as pipeline:
|
||||||
connection.hget(self.key_for(key), 'status')
|
for key in dependencies_ids:
|
||||||
for key
|
pipeline.hget(self.key_for(key), 'status')
|
||||||
in dependencies_ids
|
|
||||||
]
|
dependencies_statuses = pipeline.execute()
|
||||||
|
|
||||||
return all(
|
return all(
|
||||||
status.decode() == JobStatus.FINISHED
|
status.decode() == JobStatus.FINISHED
|
||||||
|
|
Loading…
Reference in New Issue