Skip to content

Commit 9c27f08

Browse files
committed
debugged error rerun
1 parent 29456be commit 9c27f08

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

pydra/engine/submitter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ async def expand_workflow_async(
417417
)
418418
raise RuntimeError(msg)
419419
for task in tasks:
420-
if task.is_async:
420+
if task.is_async: # Only workflows at this stage
421421
await self.worker.run_async(
422422
task, rerun=rerun and self.propagate_rerun
423423
)

pydra/engine/tests/test_workflow.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4480,10 +4480,10 @@ class EvenException(Exception):
44804480
@python.define
44814481
def PassOdds(x):
44824482
if x % 2 == 0:
4483-
print(f"x%2 = {x % 2} (error)\n")
4483+
print(f"x={x}, x%2 = {x % 2} (error)\n")
44844484
raise EvenException("even error")
44854485
else:
4486-
print(f"x%2 = {x % 2}\n")
4486+
print(f"x={x}, x%2 = {x % 2}\n")
44874487
return x
44884488

44894489
@workflow.define
@@ -4493,9 +4493,12 @@ def Worky(x):
44934493

44944494
worky = Worky(x=[1, 2, 3, 4, 5])
44954495

4496+
print("Starting run 1")
44964497
with pytest.raises(RuntimeError):
44974498
# Must be cf to get the error from all tasks, otherwise will only get the first error
44984499
worky(worker="cf", cache_dir=tmp_path, n_procs=5)
4500+
4501+
print("Starting run 2")
44994502
with pytest.raises(RuntimeError):
45004503
worky(worker="cf", cache_dir=tmp_path, n_procs=5)
45014504

0 commit comments

Comments
 (0)