Skip to content

Commit 5f3b605

Browse files
authored
Executor clears any saved result when execute is called. (#1813)
The executor interface is instanced rather than a constructor interface, and the most recent results are saved on the object as final_output and final_status. We should be able to invoke the executor more than once, however the current executor will not overwrite previously recorded results with new results. This change clears final_output and final_status each time execute() is called so that new results can be recorded.
1 parent bdf84d1 commit 5f3b605

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cwltool/executors.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ def execute(
8383
logger: logging.Logger = _logger,
8484
) -> Tuple[Union[Optional[CWLObjectType]], str]:
8585
"""Execute the process."""
86+
87+
self.final_output = []
88+
self.final_status = []
89+
8690
if not runtime_context.basedir:
8791
raise WorkflowException("Must provide 'basedir' in runtimeContext")
8892

0 commit comments

Comments
 (0)