This commit is contained in:
Kenneth Kehl
2024-12-30 11:26:31 -08:00
parent feeef72931
commit 2878fb0070
2 changed files with 4 additions and 5 deletions

View File

@@ -130,9 +130,9 @@ def check_job_status():
) )
) )
jobs_not_complete_after_allotted_time = db.session.execute( jobs_not_complete_after_allotted_time = (
jobs_not_completed_after_allotted_time db.session.execute(jobs_not_completed_after_allotted_time).scalars().all()
).scalars().all() )
# temporarily mark them as ERROR so that they don't get picked up by future check_job_status tasks # temporarily mark them as ERROR so that they don't get picked up by future check_job_status tasks
# if they haven't been re-processed in time. # if they haven't been re-processed in time.
@@ -141,8 +141,6 @@ def check_job_status():
job.job_status = JobStatus.ERROR job.job_status = JobStatus.ERROR
dao_update_job(job) dao_update_job(job)
job_ids.append(str(job.id)) job_ids.append(str(job.id))
job_ids.append(str(job.id))
if job_ids: if job_ids:
current_app.logger.info("Job(s) {} have not completed.".format(job_ids)) current_app.logger.info("Job(s) {} have not completed.".format(job_ids))
process_incomplete_jobs.apply_async([job_ids], queue=QueueNames.JOBS) process_incomplete_jobs.apply_async([job_ids], queue=QueueNames.JOBS)

View File

@@ -1385,6 +1385,7 @@ class Job(db.Model):
index=True, index=True,
nullable=False, nullable=False,
default=JobStatus.PENDING, default=JobStatus.PENDING,
native_enum=False,
) )
archived = db.Column(db.Boolean, nullable=False, default=False) archived = db.Column(db.Boolean, nullable=False, default=False)