mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-09 09:19:48 -04:00
fix enum
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user