File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed
services/web/server/src/simcore_service_webserver Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 2020)
2121from ..projects .api import has_user_project_access_rights
2222from ..resource_manager .registry import RedisResourceRegistry
23- from ..resource_manager .registry_utils import list_opened_project_ids
23+ from ..resource_manager .service import list_opened_project_ids
2424from ..users import users_service
2525from ..users .exceptions import UserNotFoundError
2626
Original file line number Diff line number Diff line change 2626 get_redis_lock_manager_client_sdk ,
2727)
2828from ..resource_manager .registry import get_registry
29- from ..resource_manager .registry_utils import list_opened_project_ids
29+ from ..resource_manager .service import list_opened_project_ids
3030from ..socketio ._utils import get_socket_server
3131from . import _projects_repository
3232
@@ -123,12 +123,12 @@ async def remove_project_documents_as_admin(app: web.Application) -> None:
123123 ):
124124 # Extract project UUID from the key pattern "projects:{project_uuid}:version"
125125 key_str = key .decode ("utf-8" ) if isinstance (key , bytes ) else key
126- match = re .match (r"projects:([0-9a-f-]+):version" , key_str )
126+ match = re .match (r"projects:(?P<project_uuid> [0-9a-f-]+):version" , key_str )
127127
128128 if not match :
129129 continue
130130
131- project_uuid_str = match .group (1 )
131+ project_uuid_str = match .group ("project_uuid" )
132132 project_uuid = ProjectID (project_uuid_str )
133133 project_room = SocketIORoomStr .from_project_id (project_uuid )
134134
Original file line number Diff line number Diff line change @@ -13,6 +13,6 @@ async def list_opened_project_ids(registry: RedisResourceRegistry) -> list[Proje
1313 all_session_alive , _ = await registry .get_all_resource_keys ()
1414 for alive_session in all_session_alive :
1515 resources = await registry .get_resources (alive_session )
16- if "project_id" in resources :
17- opened_projects .append (ProjectID (resources [ "project_id" ] ))
16+ if projects_id := resources . get ( "project_id" ) :
17+ opened_projects .append (ProjectID (projects_id ))
1818 return opened_projects
Original file line number Diff line number Diff line change 1+ from ._registry_utils import list_opened_project_ids
2+
3+ __all__ = ("list_opened_project_ids" ,)
You can’t perform that action at this time.
0 commit comments