Skip to content

Commit

Permalink
timer outside the try except
Browse files Browse the repository at this point in the history
  • Loading branch information
mayofaulkner committed Nov 6, 2021
1 parent 3f7ff1c commit a97c6bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ibllib/pipes/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
Expand Down

0 comments on commit a97c6bd

Please sign in to comment.