Minor fix.

Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
Cliff Hill
2024-07-26 12:42:36 -04:00
parent 17b078982f
commit fef3173876

View File

@@ -53,8 +53,10 @@ def cleanup_unfinished_jobs():
# if it started more than 4 hours ago, that's too long
try:
acceptable_finish_time = job.processing_started + timedelta(minutes=5)
except TypeError as e:
current_app.logger.error(f"Job ID {job.id} processing_started is {job.processing_started}.")
except TypeError:
current_app.logger.error(
f"Job ID {job.id} processing_started is {job.processing_started}."
)
raise
if now > acceptable_finish_time:
remove_csv_object(job.original_file_name)