Skip to content

Commit d18df93

Browse files
committed
fixed infinite loop in submitting slurm jobs
1 parent be2d496 commit d18df93

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pydra/engine/helpers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,10 @@ def load_and_run(task_pkl: Path, rerun: bool = False) -> Path:
541541

542542
resultfile = task.output_dir / "_result.pklz"
543543
try:
544-
task.submitter.submit(task, rerun=rerun)
544+
if task.is_async:
545+
task.submitter.submit(task, rerun=rerun)
546+
else:
547+
task.run(rerun=rerun)
545548
except Exception as e:
546549
# creating result and error files if missing
547550
errorfile = task.output_dir / "_error.pklz"

0 commit comments

Comments
 (0)