Skip to content

Commit 1d41048

Browse files
author
Alan Christie
committed
dev: Fix handling of launch() result
1 parent 17ddd62 commit 1d41048

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

workflow/workflow_engine.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -793,18 +793,22 @@ def _launch(
793793
step_project_outputs=step_preparation_response.outputs,
794794
)
795795
lr: LaunchResult = self._instance_launcher.launch(launch_parameters=lp)
796-
rwfs_id = lr.running_workflow_step_id
797-
assert rwfs_id
798796

799797
if lr.error_num:
800798
self._set_step_error(
801-
step_name, rwf_id, rwfs_id, lr.error_num, lr.error_msg
799+
step_name,
800+
rwf_id,
801+
lr.running_workflow_step_id,
802+
lr.error_num,
803+
lr.error_msg,
802804
)
803805
else:
806+
# No error - there must be a RunningWorkflowStep ID
807+
assert lr.running_workflow_step_id
804808
_LOGGER.info(
805809
"Launched step '%s' step_id=%s (command=%s)",
806810
step_name,
807-
rwfs_id,
811+
lr.running_workflow_step_id,
808812
lr.command,
809813
)
810814

0 commit comments

Comments
 (0)