Skip to content
Snippets Groups Projects
Commit 67b37e79 authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

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

parent df5c1cda
No related branches found
No related tags found
No related merge requests found
Pipeline #3492 failed
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment