File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
services/web/server/src/simcore_service_webserver/trash Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 22
33from aiohttp import web
44from servicelib .aiohttp import status
5+ from servicelib .aiohttp .application_keys import APP_FIRE_AND_FORGET_TASKS_KEY
6+ from servicelib .utils import fire_and_forget_task
57
68from .._meta import API_VTAG as VTAG
79from ..exception_handling import (
@@ -55,6 +57,12 @@ async def empty_trash(request: web.Request):
5557 user_id = get_user_id (request )
5658 product_name = get_product_name (request )
5759
58- await _service .empty_trash (request .app , product_name = product_name , user_id = user_id )
60+ fire_and_forget_task (
61+ _service .empty_trash_safe (
62+ request .app , product_name = product_name , user_id = user_id
63+ ),
64+ task_suffix_name = "rest.empty_trash" ,
65+ fire_and_forget_tasks_collection = request .app [APP_FIRE_AND_FORGET_TASKS_KEY ],
66+ )
5967
6068 return web .json_response (status = status .HTTP_204_NO_CONTENT )
You can’t perform that action at this time.
0 commit comments