Skip to content

Commit bcde82a

Browse files
author
Andrei Neagu
committed
added new settings for posrgres
1 parent b5ca1d4 commit bcde82a

File tree

1 file changed

+22
-13
lines changed
  • services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/core

1 file changed

+22
-13
lines changed

services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/core/settings.py

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from settings_library.director_v2 import DirectorV2Settings
1111
from settings_library.docker_api_proxy import DockerApiProxysettings
1212
from settings_library.http_client_request import ClientRequestSettings
13+
from settings_library.postgres import PostgresSettings
1314
from settings_library.rabbit import RabbitSettings
1415
from settings_library.redis import RedisSettings
1516
from settings_library.tracing import TracingSettings
@@ -49,19 +50,19 @@ class _BaseApplicationSettings(BaseApplicationSettings, MixinLoggingSettings):
4950
"is disabled if you want to have structured logs!"
5051
),
5152
)
52-
DYNAMIC_SCHEDULER_LOG_FILTER_MAPPING: dict[
53-
LoggerName, list[MessageSubstring]
54-
] = Field(
55-
default_factory=dict,
56-
validation_alias=AliasChoices(
57-
"LOG_FILTER_MAPPING",
58-
"DYNAMIC_SCHEDULER_LOG_FILTER_MAPPING",
59-
),
60-
description=(
61-
"is a dictionary that maps specific loggers "
62-
"(such as 'uvicorn.access' or 'gunicorn.access') to a list "
63-
"of log message patterns that should be filtered out."
64-
),
53+
DYNAMIC_SCHEDULER_LOG_FILTER_MAPPING: dict[LoggerName, list[MessageSubstring]] = (
54+
Field(
55+
default_factory=dict,
56+
validation_alias=AliasChoices(
57+
"LOG_FILTER_MAPPING",
58+
"DYNAMIC_SCHEDULER_LOG_FILTER_MAPPING",
59+
),
60+
description=(
61+
"is a dictionary that maps specific loggers "
62+
"(such as 'uvicorn.access' or 'gunicorn.access') to a list "
63+
"of log message patterns that should be filtered out."
64+
),
65+
)
6566
)
6667

6768
DYNAMIC_SCHEDULER_STOP_SERVICE_TIMEOUT: datetime.timedelta = Field(
@@ -164,6 +165,14 @@ class ApplicationSettings(_BaseApplicationSettings):
164165
Field(json_schema_extra={"auto_default_from_env": True}),
165166
]
166167

168+
DYNAMIC_SCHEDULER_POSTGRES: Annotated[
169+
PostgresSettings,
170+
Field(
171+
json_schema_extra={"auto_default_from_env": True},
172+
description="settings for postgres service",
173+
),
174+
]
175+
167176
@field_validator("DYNAMIC_SCHEDULER_UI_MOUNT_PATH", mode="before")
168177
@classmethod
169178
def _ensure_ends_with_slash(cls, v: str) -> str:

0 commit comments

Comments
 (0)