diff --git a/ibllib/pipes/tasks.py b/ibllib/pipes/tasks.py index d885e178d..787b7e449 100644 --- a/ibllib/pipes/tasks.py +++ b/ibllib/pipes/tasks.py @@ -95,17 +95,17 @@ def run(self, **kwargs): _logger.info(f"Running on machine: {self.machine}") _logger.info(f"running ibllib version {version.ibllib()}") # setup - setup = self.setUp(**kwargs) - _logger.info(f"Setup value is: {setup}") - self.status = 0 - if not setup: - # case where outputs are present but don't have input files locally to rerun task - # label task as complete - _, self.outputs = self.assert_expected_outputs() - else: - # run task + try: start_time = time.time() - try: + setup = self.setUp(**kwargs) + _logger.info(f"Setup value is: {setup}") + self.status = 0 + if not setup: + # case where outputs are present but don't have input files locally to rerun task + # label task as complete + _, self.outputs = self.assert_expected_outputs() + else: + # run task if self.gpu >= 1: if not self._creates_lock(): self.status = -2 @@ -113,10 +113,10 @@ def run(self, **kwargs): return self.outputs = self._run(**kwargs) _logger.info(f"Job {self.__class__} complete") - except BaseException: - _logger.error(traceback.format_exc()) - _logger.info(f"Job {self.__class__} errored") - self.status = -1 + except BaseException: + _logger.error(traceback.format_exc()) + _logger.info(f"Job {self.__class__} errored") + self.status = -1 self.time_elapsed_secs = time.time() - start_time # log the outputs diff --git a/release_notes.md b/release_notes.md index 2a9508b5e..7491cbc9d 100644 --- a/release_notes.md +++ b/release_notes.md @@ -1,4 +1,7 @@ ## Release Notes 2.3 +### Release Notes 2.3.1 2021-11-5 +- Add setup method in tasks.py into try except to catch globus download errors + ### Release Notes 2.3.0 2021-11-4 - Add input and output signatures to all ephys tasks - Add datahandler to task to download and upload data based on location where task is run diff --git a/setup.py b/setup.py index 76a2cfa12..804ffe80c 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ setup( name='ibllib', - version='2.3.0', + version='2.3.1', python_requires='>={}.{}'.format(*REQUIRED_PYTHON), description='IBL libraries', license="MIT",