Skip to content

Commit 7fccacb

Browse files
move build_task_id
1 parent c031079 commit 7fccacb

File tree

1 file changed

+3
-5
lines changed
  • services/storage/src/simcore_service_storage/modules/celery

1 file changed

+3
-5
lines changed

services/storage/src/simcore_service_storage/modules/celery/client.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,7 @@ async def _get_task_progress_report(
127127
)
128128

129129
@make_async()
130-
def _get_task_celery_state(
131-
self, task_context: TaskContext, task_uuid: TaskUUID
132-
) -> TaskState:
133-
task_id = build_task_id(task_context, task_uuid)
130+
def _get_task_celery_state(self, task_id: TaskID) -> TaskState:
134131
return TaskState(self._celery_app.AsyncResult(task_id).state)
135132

136133
async def get_task_status(
@@ -141,7 +138,8 @@ async def get_task_status(
141138
logging.DEBUG,
142139
msg=f"Getting task status: {task_context=} {task_uuid=}",
143140
):
144-
task_state = await self._get_task_celery_state(task_context, task_uuid)
141+
task_id = build_task_id(task_context, task_uuid)
142+
task_state = await self._get_task_celery_state(task_id)
145143
return TaskStatus(
146144
task_uuid=task_uuid,
147145
task_state=task_state,

0 commit comments

Comments
 (0)