From 8e4ab406203cd1e4b7ed5e0039ee4b0545f3e6f2 Mon Sep 17 00:00:00 2001 From: "Moore, Harry" Date: Tue, 15 Feb 2022 11:05:20 +0100 Subject: [PATCH] produce execution summary after parallel pmx step --- src/icolos/core/workflow_steps/pmx/base.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/icolos/core/workflow_steps/pmx/base.py b/src/icolos/core/workflow_steps/pmx/base.py index a62e26f..4f021fe 100644 --- a/src/icolos/core/workflow_steps/pmx/base.py +++ b/src/icolos/core/workflow_steps/pmx/base.py @@ -298,7 +298,7 @@ def _execute_pmx_step_parallel( # # TODO: find a reliable way to sort this, ideally by inspecting log files if result_checker is not None: batch_results = result_checker(jobs) - + good_results = 0 for task, result in zip(next_batch, batch_results): for subtask, sub_result in zip(task, result): if sub_result: @@ -308,7 +308,17 @@ def _execute_pmx_step_parallel( ) else: subtask.set_status_success() + good_results += 1 + self._logger.log( + f"EXECUTION SUMMARY: Completed {good_results} jobs successfully (out of {len(jobs) * len(jobs)[0]} jobs for step {step_id}", + _LE.INFO, + ) + else: + self._logger.log( + f"Warning: Return codes for step {step_id} are not being checked!", + _LE.WARNING, + ) for element in next_batch: for subtask in element: subtask.set_status_success()