Add application column to tasks (#1291)

Co-authored-by: Muhammed Salih Altun <muhammedsalihaltun@gmail.com>
This commit is contained in:
Shuchang Zheng
2024-11-29 05:43:02 -08:00
committed by GitHub
parent fe0f971842
commit 379d5a30cd
7 changed files with 42 additions and 0 deletions

View File

@@ -421,6 +421,7 @@ async def get_agent_tasks(
workflow_run_id: Annotated[str | None, Query()] = None,
current_org: Organization = Depends(org_auth_service.get_current_org),
only_standalone_tasks: bool = Query(False),
application: Annotated[str | None, Query()] = None,
sort: OrderBy = Query(OrderBy.created_at),
order: SortDirection = Query(SortDirection.desc),
) -> Response:
@@ -451,6 +452,7 @@ async def get_agent_tasks(
only_standalone_tasks=only_standalone_tasks,
order=order,
order_by_column=sort,
application=application,
)
return ORJSONResponse([task.to_task_response().model_dump() for task in tasks])