mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 10:21:14 -05:00
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user