Misc logging cleanup

This commit is contained in:
Brett Williams
2024-08-05 10:57:56 -05:00
parent 4df41a2079
commit 90d5e9b7af
4 changed files with 31 additions and 18 deletions

View File

@@ -222,14 +222,14 @@ class DistributedJobManager:
for subjob_filename in subjob_files:
if subjob_filename not in local_files:
logger.info(f"Missing file '{subjob_filename}' from {subjob_hostname}")
try:
logger.debug(f"Downloading new file '{subjob_filename}' from {subjob_hostname}")
local_save_path = os.path.join(os.path.dirname(local_job.output_path), subjob_filename)
subjob_proxy.download_job_file(job_id=subjob_id, job_filename=subjob_filename,
save_path=local_save_path)
logger.debug(f'Downloaded successfully - {local_save_path}')
except Exception as e:
logger.error(f"Error downloading file '{subjob_filename}': {e}")
logger.error(f"Error downloading file '{subjob_filename}' from {subjob_hostname}: {e}")
except Exception as e:
logger.exception(f'Uncaught exception while trying to download from subjob: {e}')