fix(backend): Revert non-async routes that are changed to async (#8734)

pull/8710/head^2
Zamil Majdy 2024-11-21 17:46:55 +07:00 committed by GitHub
parent c14ab0c37a
commit 6954f4eb0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 6 deletions

View File

@ -91,9 +91,7 @@ class AgentServer(backend.util.service.AppProcess):
async def test_execute_graph(
graph_id: str, node_input: dict[typing.Any, typing.Any], user_id: str
):
return await backend.server.routers.v1.execute_graph(
graph_id, node_input, user_id
)
return backend.server.routers.v1.execute_graph(graph_id, node_input, user_id)
@staticmethod
async def test_create_graph(

View File

@ -276,7 +276,7 @@ async def set_graph_active_version(
tags=["graphs"],
dependencies=[Depends(auth_middleware)],
)
async def execute_graph(
def execute_graph(
graph_id: str,
node_input: dict[Any, Any],
user_id: Annotated[str, Depends(get_user_id)],
@ -481,7 +481,7 @@ async def create_schedule(
tags=["schedules"],
dependencies=[Depends(auth_middleware)],
)
async def delete_schedule(
def delete_schedule(
schedule_id: str,
user_id: Annotated[str, Depends(get_user_id)],
) -> dict[Any, Any]:
@ -494,7 +494,7 @@ async def delete_schedule(
tags=["schedules"],
dependencies=[Depends(auth_middleware)],
)
async def get_execution_schedules(
def get_execution_schedules(
user_id: Annotated[str, Depends(get_user_id)],
graph_id: str | None = None,
) -> list[scheduler.JobInfo]: