Commit 67b37e79 authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

ENH: allow potentially nested tuple of job ids in wait()

parent df5c1cda
Pipeline #3492 failed with stages
in 8 minutes and 59 seconds
......@@ -202,10 +202,8 @@ def wait(job_ids):
:arg job_ids: string or tuple of strings with jobs that should finish
before continuing
"""
if isinstance(job_ids, string_types):
job_ids = (job_ids, )
start_time = time.time()
for job_id in job_ids:
for job_id in _flatten_job_ids(job_ids):
log.debug('Waiting for job {}'.format(job_id))
while len(info(job_id)) > 0:
wait_time = min(max(1, (time.time() - start_time) / 3.), 20)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment