Skip to content

Commit

Permalink
refactor settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Neagu committed Nov 19, 2024
1 parent 8387d84 commit 24f8abd
Showing 1 changed file with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
from datetime import timedelta
from functools import lru_cache
from pathlib import Path
from typing import Annotated, cast
from typing import cast

from common_library.pydantic_validators import validate_numeric_string_as_timedelta
from models_library.basic_types import BootModeEnum, PortInt
from models_library.basic_types import PortInt
from models_library.callbacks_mapping import CallbacksMapping
from models_library.products import ProductName
from models_library.projects import ProjectID
Expand All @@ -21,8 +21,8 @@
field_validator,
)
from servicelib.logging_utils_filtering import LoggerName, MessageSubstring
from settings_library.application import BaseApplicationSettings
from settings_library.aws_s3_cli import AwsS3CliSettings
from settings_library.base import BaseCustomSettings
from settings_library.docker_registry import RegistrySettings
from settings_library.node_ports import StorageAuthSettings
from settings_library.postgres import PostgresSettings
Expand All @@ -35,7 +35,7 @@
from settings_library.utils_logging import MixinLoggingSettings


class ResourceTrackingSettings(BaseCustomSettings):
class ResourceTrackingSettings(BaseApplicationSettings):
RESOURCE_TRACKING_HEARTBEAT_INTERVAL: timedelta = Field(
default=DEFAULT_RESOURCE_USAGE_HEARTBEAT_INTERVAL,
description="each time the status of the service is propagated",
Expand All @@ -46,20 +46,13 @@ class ResourceTrackingSettings(BaseCustomSettings):
)


class SystemMonitorSettings(BaseCustomSettings):
class SystemMonitorSettings(BaseApplicationSettings):
DY_SIDECAR_SYSTEM_MONITOR_TELEMETRY_ENABLE: bool = Field(
default=False, description="enabled/disabled disk usage monitoring"
)


class ApplicationSettings(BaseCustomSettings, MixinLoggingSettings):
SC_BOOT_MODE: Annotated[
BootModeEnum,
Field(
...,
description="boot mode helps determine if in development mode or normal operation",
),
]
class ApplicationSettings(BaseApplicationSettings, MixinLoggingSettings):

DYNAMIC_SIDECAR_DY_VOLUMES_MOUNT_DIR: Path = Field(
...,
Expand Down

0 comments on commit 24f8abd

Please sign in to comment.