|
32 | 32 | _logger = logging.getLogger(__name__) |
33 | 33 |
|
34 | 34 |
|
35 | | -def _get_job_id_data(user_id: UserID, product_name: ProductName) -> AsyncJobFilter: |
| 35 | +def _get_job_filter(user_id: UserID, product_name: ProductName) -> AsyncJobFilter: |
36 | 36 | return AsyncJobFilter( |
37 | 37 | user_id=user_id, product_name=product_name, client_name=_ASYNC_JOB_CLIENT_NAME |
38 | 38 | ) |
@@ -65,7 +65,7 @@ async def list_tasks( |
65 | 65 | async_jobs: Annotated[AsyncJobClient, Depends(get_async_jobs_client)], |
66 | 66 | ): |
67 | 67 | user_async_jobs = await async_jobs.list_jobs( |
68 | | - job_filter=_get_job_id_data(user_id, product_name), |
| 68 | + job_filter=_get_job_filter(user_id, product_name), |
69 | 69 | filter_="", |
70 | 70 | ) |
71 | 71 | app_router = app.router |
@@ -106,7 +106,7 @@ async def get_task_status( |
106 | 106 | ): |
107 | 107 | async_job_rpc_status = await async_jobs.status( |
108 | 108 | job_id=task_id, |
109 | | - job_filter=_get_job_id_data(user_id, product_name), |
| 109 | + job_filter=_get_job_filter(user_id, product_name), |
110 | 110 | ) |
111 | 111 | _task_id = f"{async_job_rpc_status.job_id}" |
112 | 112 | return TaskStatus( |
@@ -138,7 +138,7 @@ async def cancel_task( |
138 | 138 | ): |
139 | 139 | await async_jobs.cancel( |
140 | 140 | job_id=task_id, |
141 | | - job_filter=_get_job_id_data(user_id, product_name), |
| 141 | + job_filter=_get_job_filter(user_id, product_name), |
142 | 142 | ) |
143 | 143 |
|
144 | 144 |
|
@@ -172,6 +172,6 @@ async def get_task_result( |
172 | 172 | ): |
173 | 173 | async_job_rpc_result = await async_jobs.result( |
174 | 174 | job_id=task_id, |
175 | | - job_filter=_get_job_id_data(user_id, product_name), |
| 175 | + job_filter=_get_job_filter(user_id, product_name), |
176 | 176 | ) |
177 | 177 | return TaskResult(result=async_job_rpc_result.result, error=None) |
0 commit comments