@@ -60,7 +60,7 @@ async def get_async_jobs(request: web.Request) -> web.Response:
6060 session = get_client_session (request .app )
6161 async with session .request (
6262 "GET" ,
63- request .url .with_path (str (request .app .router ["list_tasks" ])),
63+ request .url .with_path (str (request .app .router ["list_tasks" ]. url_for () )),
6464 ssl = False ,
6565 cookies = request .cookies ,
6666 ) as resp :
@@ -71,7 +71,7 @@ async def get_async_jobs(request: web.Request) -> web.Response:
7171 content_type = resp .content_type ,
7272 )
7373 inprocess_tasks = (
74- Envelope [list [TaskGet ]].model_validate_json (await resp .json ()).data
74+ Envelope [list [TaskGet ]].model_validate_json (await resp .text ()).data
7575 )
7676 assert inprocess_tasks is not None # nosec
7777
@@ -92,9 +92,9 @@ async def get_async_jobs(request: web.Request) -> web.Response:
9292 TaskGet (
9393 task_id = f"{ job .job_id } " ,
9494 task_name = f"{ job .job_id } " ,
95- status_href = f"{ request .url .with_path (str (request .app .router ['get_async_job_status' ].url_for (job_id = str (job .job_id ))))} " ,
96- abort_href = f"{ request .url .with_path (str (request .app .router ['abort_async_job' ].url_for (job_id = str (job .job_id ))))} " ,
97- result_href = f"{ request .url .with_path (str (request .app .router ['get_async_job_result' ].url_for (job_id = str (job .job_id ))))} " ,
95+ status_href = f"{ request .url .with_path (str (request .app .router ['get_async_job_status' ].url_for (task_id = str (job .job_id ))))} " ,
96+ abort_href = f"{ request .url .with_path (str (request .app .router ['abort_async_job' ].url_for (task_id = str (job .job_id ))))} " ,
97+ result_href = f"{ request .url .with_path (str (request .app .router ['get_async_job_result' ].url_for (task_id = str (job .job_id ))))} " ,
9898 )
9999 for job in user_async_jobs
100100 ]
0 commit comments