mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 18:31:13 -05:00
start on jobs dao
This commit is contained in:
@@ -65,11 +65,12 @@ 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))
|
||||||
|
|
||||||
return (
|
stmt =(
|
||||||
select(*query_filter)
|
select(*query_filter)
|
||||||
.order_by(Job.processing_started.desc(), Job.created_at.desc())
|
.order_by(Job.processing_started.desc(), Job.created_at.desc())
|
||||||
.paginate(page=page, per_page=page_size)
|
|
||||||
)
|
)
|
||||||
|
return db.session.execute(stmt).paginate(page=page, per_page=page_size)
|
||||||
|
|
||||||
|
|
||||||
def dao_get_scheduled_job_stats(
|
def dao_get_scheduled_job_stats(
|
||||||
|
|||||||
Reference in New Issue
Block a user