Skip to content

Commit 09d4018

Browse files
author
Andrei Neagu
committed
fixed settings
1 parent 11164ac commit 09d4018

File tree

1 file changed

+15
-5
lines changed
  • services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/core

1 file changed

+15
-5
lines changed

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

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import datetime
22

3-
from pydantic import AliasChoices, Field, TypeAdapter, field_validator
3+
from pydantic import AliasChoices, ConfigDict, Field, TypeAdapter, field_validator
44
from servicelib.logging_utils_filtering import LoggerName, MessageSubstring
55
from settings_library.application import BaseApplicationSettings
66
from settings_library.basic_types import LogLevel, VersionTag
@@ -32,19 +32,27 @@ class _BaseApplicationSettings(BaseApplicationSettings, MixinLoggingSettings):
3232
DYNAMIC_SCHEDULER_LOG_FORMAT_LOCAL_DEV_ENABLED: bool = Field(
3333
default=False,
3434
validation_alias=AliasChoices(
35-
"DYNAMIC_SCHEDULER_LOG_FORMAT_LOCAL_DEV_ENABLED",
3635
"LOG_FORMAT_LOCAL_DEV_ENABLED",
36+
"DYNAMIC_SCHEDULER_LOG_FORMAT_LOCAL_DEV_ENABLED",
37+
),
38+
description=(
39+
"Enables local development log format. WARNING: make sure it "
40+
"is disabled if you want to have structured logs!"
3741
),
38-
description="Enables local development log format. WARNING: make sure it is disabled if you want to have structured logs!",
3942
)
4043
DYNAMIC_SCHEDULER_LOG_FILTER_MAPPING: dict[
4144
LoggerName, list[MessageSubstring]
4245
] = Field(
4346
default_factory=dict,
4447
validation_alias=AliasChoices(
45-
"DYNAMIC_SCHEDULER_LOG_FILTER_MAPPING", "LOG_FILTER_MAPPING"
48+
"LOG_FILTER_MAPPING",
49+
"DYNAMIC_SCHEDULER_LOG_FILTER_MAPPING",
50+
),
51+
description=(
52+
"is a dictionary that maps specific loggers "
53+
"(such as 'uvicorn.access' or 'gunicorn.access') to a list "
54+
"of log message patterns that should be filtered out."
4655
),
47-
description="is a dictionary that maps specific loggers (such as 'uvicorn.access' or 'gunicorn.access') to a list of log message patterns that should be filtered out.",
4856
)
4957

5058
DYNAMIC_SCHEDULER_STOP_SERVICE_TIMEOUT: datetime.timedelta = Field(
@@ -60,6 +68,8 @@ class _BaseApplicationSettings(BaseApplicationSettings, MixinLoggingSettings):
6068
def _validate_log_level(cls, value: str) -> str:
6169
return cls.validate_log_level(value)
6270

71+
model_config = ConfigDict(extra="allow")
72+
6373

6474
class ApplicationSettings(_BaseApplicationSettings):
6575
"""Web app's environment variables

0 commit comments

Comments
 (0)