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