Skip to content

Commit ce2154a

Browse files
committed
enh: account for timeouts during job status checks
1 parent 50862c1 commit ce2154a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

nipype/pipeline/plugins/slurm.py

+4
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ def _is_pending(self, taskid):
7070
terminal_output='allatonce').run()
7171
return res.runtime.stdout.find(str(taskid)) > -1
7272
except RuntimeError as e:
73+
if any(ss in str(e) for ss
74+
in ['Socket timed out', 'not available at the moment']):
75+
# do not raise error and allow recheck
76+
return True
7377
if 'Invalid job id' not in str(e):
7478
raise(e)
7579
return False

0 commit comments

Comments
 (0)