File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
services/web/server/src/simcore_service_webserver/realtime Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1313 logger = _logger ,
1414)
1515def setup_realtime_collaboration (app : web .Application ):
16- assert app ["settings" ].WEBSERVER_REALTIME_COLLABORATION # nosec
16+ from .settings import get_plugin_settings
17+
18+ assert get_plugin_settings (app ), "setup_settings not called?"
Original file line number Diff line number Diff line change 11from typing import Annotated
22
3+ from aiohttp import web
34from pydantic import (
45 PositiveInt ,
56)
67from pydantic .fields import Field
78from settings_library .base import BaseCustomSettings
89
10+ from ..constants import APP_SETTINGS_KEY
11+
912
1013class RealTimeCollaborationSettings (BaseCustomSettings ):
1114 RTC_MAX_NUMBER_OF_USERS : Annotated [
@@ -14,3 +17,10 @@ class RealTimeCollaborationSettings(BaseCustomSettings):
1417 description = "Maximum number of users allowed in a real-time collaboration session" ,
1518 ),
1619 ]
20+
21+
22+ def get_plugin_settings (app : web .Application ) -> RealTimeCollaborationSettings :
23+ settings = app [APP_SETTINGS_KEY ].WEBSERVER_REALTIME_COLLABORATION
24+ assert settings , "setup_settings not called?" # nosec
25+ assert isinstance (settings , RealTimeCollaborationSettings ) # nosec
26+ return settings
You can’t perform that action at this time.
0 commit comments