From 0a5ceabc73607ad3c5cbdf8f3cdf3025b8ea19fe Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Fri, 11 May 2018 14:46:01 +0100 Subject: [PATCH] fw/execution: finalize jobs before run. Finalize jobs before performing whole-run finalization. This makes more sense than finalizing individual jobs after run as a whole has been finalized. --- wa/framework/execution.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wa/framework/execution.py b/wa/framework/execution.py index 32883d8f..ed5cf6ed 100644 --- a/wa/framework/execution.py +++ b/wa/framework/execution.py @@ -448,15 +448,16 @@ class Runner(object): self.context.write_state() def finalize_run(self): + self.logger.info('Run completed') + with log.indentcontext(): + for job in self.context.completed_jobs: + job.finalize(self.context) self.logger.info('Finalizing run') self.context.end_run() self.pm.enable_all() self.pm.process_run_output(self.context) self.pm.export_run_output(self.context) self.pm.finalize() - with log.indentcontext(): - for job in self.context.completed_jobs: - job.finalize(self.context) signal.disconnect(self._error_signalled_callback, signal.ERROR_LOGGED) signal.disconnect(self._warning_signalled_callback, signal.WARNING_LOGGED)