File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed
src/simcore_service_storage/modules/celery Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change 1616
1717from .models import (
1818 TaskContext ,
19+ TaskID ,
1920 TaskMetadata ,
2021 TaskMetadataStore ,
2122 TaskState ,
@@ -78,16 +79,18 @@ async def send_task(
7879 await self ._task_store .set (task_id , task_metadata , expiry = expiry )
7980 return task_uuid
8081
81- @staticmethod
8282 @make_async ()
83- def abort_task (task_context : TaskContext , task_uuid : TaskUUID ) -> None :
83+ def _abort_task (self , task_id : TaskID ) -> None :
84+ AbortableAsyncResult (task_id , app = self ._celery_app ).abort ()
85+
86+ async def abort_task (self , task_context : TaskContext , task_uuid : TaskUUID ) -> None :
8487 with log_context (
8588 _logger ,
8689 logging .DEBUG ,
8790 msg = f"Abort task: { task_context = } { task_uuid = } " ,
8891 ):
8992 task_id = build_task_id (task_context , task_uuid )
90- AbortableAsyncResult ( task_id ). abort ( )
93+ return await self . _abort_task ( task_id )
9194
9295 async def get_task_result (
9396 self , task_context : TaskContext , task_uuid : TaskUUID
Original file line number Diff line number Diff line change @@ -241,15 +241,7 @@ async def test_asybc_jobs_workflow(
241241 "exposed_rpc_start" ,
242242 [
243243 rpc_sync_job .__name__ ,
244- pytest .param (
245- rpc_async_job .__name__ ,
246- marks = pytest .mark .skip (
247- reason = (
248- "hangs after teardown for unknown reason "
249- "SEE https://github.com/ITISFoundation/osparc-simcore/issues/7486"
250- )
251- ),
252- ),
244+ rpc_async_job .__name__ ,
253245 ],
254246)
255247async def test_async_jobs_cancel (
You can’t perform that action at this time.
0 commit comments