diff --git a/banzai/utils/realtime_utils.py b/banzai/utils/realtime_utils.py index 639f5146..e26fe28c 100644 --- a/banzai/utils/realtime_utils.py +++ b/banzai/utils/realtime_utils.py @@ -48,6 +48,7 @@ def need_to_process_image(file_info, context): if 'frameid' in file_info: if 'version_set' not in file_info: + logger.info("Version set not available in file_info", extra_tags={"filename": file_info['filename']}) return True checksum = file_info['version_set'][0].get('md5') filename = file_info['filename'] @@ -57,7 +58,7 @@ def need_to_process_image(file_info, context): logger.info("Checking if file needs to be processed", extra_tags={"filename": filename}) if not (filename.endswith('.fits') or filename.endswith('.fits.fz')): - logger.debug("Filename does not have a .fits extension, stopping reduction", + logger.error("Filename does not have a .fits extension, stopping reduction", extra_tags={"filename": filename}) return False @@ -70,6 +71,7 @@ def need_to_process_image(file_info, context): # Check the md5. # Reset the number of tries if the file has changed on disk/in s3 if image.checksum != checksum: + logger.info('File has changed on disk. Resetting success flags and tries', extra_tags={'filename': filename}) need_to_process = True image.checksum = checksum image.tries = 0 @@ -78,6 +80,7 @@ def need_to_process_image(file_info, context): # Check if we need to try again elif image.tries < context.max_tries and not image.success: + logger.info('File has not been successfully processed yet. Trying again.', extra_tags={'filename': filename}) need_to_process = True dbs.commit_processed_image(image, context.db_address)