Skip to content

Commit cfd9074

Browse files
remove aborted task
1 parent bd3149f commit cfd9074

File tree

1 file changed

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

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,18 @@ async def submit_task(
6969
return task_uuid
7070

7171
@make_async()
72-
def _abort_task(self, task_context: TaskContext, task_uuid: TaskUUID) -> None:
73-
AbortableAsyncResult(
74-
build_task_id(task_context, task_uuid), app=self._celery_app
75-
).abort()
72+
def _abort_task(self, task_id: TaskID) -> None:
73+
AbortableAsyncResult(task_id, app=self._celery_app).abort()
7674

7775
async def abort_task(self, task_context: TaskContext, task_uuid: TaskUUID) -> None:
7876
with log_context(
7977
_logger,
8078
logging.DEBUG,
8179
msg=f"task abortion: {task_context=} {task_uuid=}",
8280
):
83-
await self._abort_task(task_context, task_uuid)
81+
task_id = build_task_id(task_context, task_uuid)
82+
await self._abort_task(task_id)
83+
await self._task_info_store.remove_task(task_id)
8484

8585
async def delete_task(self, task_context: TaskContext, task_uuid: TaskUUID) -> None:
8686
with log_context(

0 commit comments

Comments
 (0)