Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fslpy
Commits
67b37e79
Commit
67b37e79
authored
Mar 29, 2019
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
fsl/utils/fslsub.py
View file @
67b37e79
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment