mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:15:19 -05: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_completed_after_allotted_time
|
||||
).scalars().all()
|
||||
jobs_not_complete_after_allotted_time = (
|
||||
db.session.execute(jobs_not_completed_after_allotted_time).scalars().all()
|
||||
)
|
||||
|
||||
# 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.
|
||||
@@ -141,8 +141,6 @@ def check_job_status():
|
||||
job.job_status = JobStatus.ERROR
|
||||
dao_update_job(job)
|
||||
job_ids.append(str(job.id))
|
||||
|
||||
job_ids.append(str(job.id))
|
||||
if job_ids:
|
||||
current_app.logger.info("Job(s) {} have not completed.".format(job_ids))
|
||||
process_incomplete_jobs.apply_async([job_ids], queue=QueueNames.JOBS)
|
||||
|
||||
@@ -1385,6 +1385,7 @@ class Job(db.Model):
|
||||
index=True,
|
||||
nullable=False,
|
||||
default=JobStatus.PENDING,
|
||||
native_enum=False,
|
||||
)
|
||||
archived = db.Column(db.Boolean, nullable=False, default=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user