From a97c6bd08c10d70b6634685cc7670160cabeca81 Mon Sep 17 00:00:00 2001 From: Mayo Faulkner Date: Sat, 6 Nov 2021 08:43:59 +0000 Subject: [PATCH] timer outside the try except --- ibllib/pipes/tasks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ibllib/pipes/tasks.py b/ibllib/pipes/tasks.py index 787b7e449..6496b5500 100644 --- a/ibllib/pipes/tasks.py +++ b/ibllib/pipes/tasks.py @@ -95,8 +95,8 @@ def run(self, **kwargs): _logger.info(f"Running on machine: {self.machine}") _logger.info(f"running ibllib version {version.ibllib()}") # setup + start_time = time.time() try: - start_time = time.time() setup = self.setUp(**kwargs) _logger.info(f"Setup value is: {setup}") self.status = 0 @@ -117,7 +117,8 @@ def run(self, **kwargs): _logger.error(traceback.format_exc()) _logger.info(f"Job {self.__class__} errored") self.status = -1 - self.time_elapsed_secs = time.time() - start_time + + self.time_elapsed_secs = time.time() - start_time # log the outputs if isinstance(self.outputs, list):