diff --git a/datalab/datalab_session/data_operations/data_operation.py b/datalab/datalab_session/data_operations/data_operation.py index 9e8b805..6b7408f 100644 --- a/datalab/datalab_session/data_operations/data_operation.py +++ b/datalab/datalab_session/data_operations/data_operation.py @@ -90,7 +90,7 @@ def get_percent_completion(self) -> float: def set_output(self, output_data: dict): self.set_status('COMPLETED') - self.set_percent_completion(100.0) + self.set_percent_completion(1.0) cache.set(f'operation_{self.cache_key}_output', output_data, CACHE_DURATION) def get_output(self) -> dict: @@ -145,7 +145,7 @@ def get_fits_npdata(self, input_files: list[dict], percent=None, cur_percent=Non try: fits_url = archive_record[0].get('url', 'No URL found') - except Exception as e: + except IndexError as e: raise FileNotFoundError(f"No image found with specified basename: {basename} Error: {e}") with fits.open(fits_url) as hdu_list: diff --git a/datalab/datalab_session/data_operations/median.py b/datalab/datalab_session/data_operations/median.py index f785663..76693db 100644 --- a/datalab/datalab_session/data_operations/median.py +++ b/datalab/datalab_session/data_operations/median.py @@ -60,6 +60,6 @@ def operate(self): else: output = {'output_files': []} - log.info(f'Median operation output: {output}') self.set_percent_completion(1.0) self.set_output(output) + log.info(f'Median output: {self.get_output()}')