mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-08 04:08:25 -04:00
start on jobs dao
This commit is contained in:
@@ -65,10 +65,8 @@ def dao_get_jobs_by_service_id(
|
|||||||
if statuses is not None and statuses != [""]:
|
if statuses is not None and statuses != [""]:
|
||||||
query_filter.append(Job.job_status.in_(statuses))
|
query_filter.append(Job.job_status.in_(statuses))
|
||||||
|
|
||||||
stmt =(
|
stmt = select(*query_filter).order_by(
|
||||||
select(*query_filter)
|
Job.processing_started.desc(), Job.created_at.desc()
|
||||||
.order_by(Job.processing_started.desc(), Job.created_at.desc())
|
|
||||||
|
|
||||||
)
|
)
|
||||||
return db.session.execute(stmt).paginate(page=page, per_page=page_size)
|
return db.session.execute(stmt).paginate(page=page, per_page=page_size)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user