down to line 179

This commit is contained in:
Kenneth Kehl
2024-10-16 12:05:56 -07:00
parent 0182affc89
commit e8efde314d

View File

@@ -119,11 +119,11 @@ def dao_set_scheduled_jobs_to_pending():
select(
Job.job_status == JobStatus.SCHEDULED,
Job.scheduled_for < utc_now(),
)
).select_from(Job)
.order_by(asc(Job.scheduled_for))
.with_for_update()
)
jobs = db.session.execute(stmt).all()
jobs = db.session.execute(stmt).scalars().all()
for job in jobs:
job.job_status = JobStatus.PENDING