Skip to content

Commit a936e87

Browse files
committed
new env
1 parent b026b90 commit a936e87

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

.env-devel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,8 @@ WEBSERVER_PROJECTS={}
395395
WEBSERVER_PROMETHEUS_API_VERSION=v1
396396
WEBSERVER_PROMETHEUS_URL=http://prometheus:9090
397397
WEBSERVER_PUBLICATIONS=1
398+
# WEBSERVER_REALTIME_COLLABORATION='{"RTC_MAX_NUMBER_OF_USERS":3}'
399+
WEBSERVER_REALTIME_COLLABORATION=null
398400
WEBSERVER_SCICRUNCH={}
399401
WEBSERVER_SESSION_SECRET_KEY='REPLACE_ME_with_result__Fernet_generate_key='
400402
WEBSERVER_SOCKETIO=1

services/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,7 @@ services:
673673
SWARM_STACK_NAME: ${SWARM_STACK_NAME}
674674

675675
WEBSERVER_DEV_FEATURES_ENABLED: ${WEBSERVER_DEV_FEATURES_ENABLED}
676+
WEBSERVER_REALTIME_COLLABORATION: ${WEBSERVER_REALTIME_COLLABORATION}
676677

677678
WEBSERVER_LOGLEVEL: ${WEBSERVER_LOGLEVEL}
678679
WEBSERVER_PROFILING: ${WEBSERVER_PROFILING}

services/web/server/src/simcore_service_webserver/application_settings.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from pydantic import (
1111
AliasChoices,
1212
AnyHttpUrl,
13+
PositiveInt,
1314
TypeAdapter,
1415
field_validator,
1516
model_validator,
@@ -55,11 +56,20 @@
5556

5657

5758
# NOTE: to mark a plugin as a DEV-FEATURE annotated it with
58-
# `Field(json_schema_extra={_X_DEV_FEATURE_FLAG: True})`
59+
# `Field(json_schema_extra={_X_FEATURE_UNDER_DEVELOPMENT: True})`
5960
# This will force it to be disabled when WEBSERVER_DEV_FEATURES_ENABLED=False
6061
_X_FEATURE_UNDER_DEVELOPMENT: Final[str] = "x-dev-feature"
6162

6263

64+
class RealTimeCollaborationSettings(BaseApplicationSettings):
65+
RTC_MAX_NUMBER_OF_USERS: Annotated[
66+
PositiveInt,
67+
Field(
68+
description="Maximum number of users allowed in a real-time collaboration session",
69+
),
70+
]
71+
72+
6373
class ApplicationSettings(BaseApplicationSettings, MixinLoggingSettings):
6474
# CODE STATICS ---------------------------------------------------------
6575
API_VERSION: str = API_VERSION
@@ -277,6 +287,17 @@ class ApplicationSettings(BaseApplicationSettings, MixinLoggingSettings):
277287
Field(json_schema_extra={"auto_default_from_env": True}),
278288
]
279289

290+
WEBSERVER_REALTIME_COLLABORATION: Annotated[
291+
RealTimeCollaborationSettings | None,
292+
Field(
293+
description="Enables real-time collaboration features",
294+
json_schema_extra={
295+
"auto_default_from_env": True,
296+
_X_FEATURE_UNDER_DEVELOPMENT: True,
297+
},
298+
),
299+
]
300+
280301
WEBSERVER_REDIS: Annotated[
281302
RedisSettings | None, Field(json_schema_extra={"auto_default_from_env": True})
282303
]

0 commit comments

Comments
 (0)