File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
services/web/server/src/simcore_service_webserver Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1212from tenacity .before_sleep import before_sleep_log
1313from tenacity .wait import wait_exponential
1414
15- from ..trash . _service import prune_trash
15+ from ..trash import trash_service
1616
1717_logger = logging .getLogger (__name__ )
1818
2828 before_sleep = before_sleep_log (_logger , logging .WARNING ),
2929)
3030async def _run_task (app : web .Application ):
31- if deleted := await prune_trash (app ):
31+ if deleted := await trash_service . delete_expired_trash (app ):
3232 for name in deleted :
3333 _logger .info ("Trash item %s expired and was deleted" , f"{ name } " )
3434 else :
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ async def _empty_explicitly_trashed_projects(
6262 )
6363
6464
65- async def _empty_trashed_folders (
65+ async def _empty_explicitly_trashed_folders_and_content (
6666 app : web .Application , product_name : ProductName , user_id : UserID
6767):
6868 trashed_folders_ids = await folders_trash_service .list_explicitly_trashed_folders (
@@ -104,10 +104,10 @@ async def empty_trash_safe(
104104):
105105 await _empty_explicitly_trashed_projects (app , product_name , user_id )
106106
107- await _empty_trashed_folders (app , product_name , user_id )
107+ await _empty_explicitly_trashed_folders_and_content (app , product_name , user_id )
108108
109109
110- async def prune_trash (app : web .Application ) -> list [str ]:
110+ async def delete_expired_trash (app : web .Application ) -> list [str ]:
111111 """Deletes expired items in the trash"""
112112 settings = get_plugin_settings (app )
113113
Original file line number Diff line number Diff line change 1+ from ._service import delete_expired_trash
2+
3+ __all__ : tuple [str , ...] = ("delete_expired_trash" ,)
4+ # nopycln: file
You can’t perform that action at this time.
0 commit comments