11import logging
2- from typing import Annotated , cast
2+ from typing import Annotated , Final , cast
33from urllib .parse import quote
44
55from fastapi import APIRouter , Depends , Header , Request
@@ -259,6 +259,9 @@ async def abort_upload_file(
259259 await dsm .abort_file_upload (query_params .user_id , file_id )
260260
261261
262+ _UNDEFINED_PRODUCT_NAME_FOR_WORKER_TASKS : Final [str ] = "undefinedproduct"
263+
264+
262265@router .post (
263266 "/locations/{location_id}/files/{file_id:path}:complete" ,
264267 response_model = Envelope [FileUploadCompleteResponse ],
@@ -277,7 +280,7 @@ async def complete_upload_file(
277280 # for completeness
278281 async_job_name_data = AsyncJobNameData (
279282 user_id = query_params .user_id ,
280- product_name = "osparc" , # TODO: fix this
283+ product_name = _UNDEFINED_PRODUCT_NAME_FOR_WORKER_TASKS , # NOTE: I would need to change the API here
281284 )
282285 task_uuid = await celery_client .send_task (
283286 remote_complete_upload_file .__name__ ,
@@ -331,7 +334,7 @@ async def is_completed_upload_file(
331334 # for completeness
332335 async_job_name_data = AsyncJobNameData (
333336 user_id = query_params .user_id ,
334- product_name = "osparc" , # TODO: fix this
337+ product_name = _UNDEFINED_PRODUCT_NAME_FOR_WORKER_TASKS , # NOTE: I would need to change the API here
335338 )
336339 task_status = await celery_client .get_task_status (
337340 task_context = async_job_name_data .model_dump (), task_uuid = TaskUUID (future_id )
0 commit comments