|
5 | 5 | from aiohttp import web |
6 | 6 | from common_library.basic_types import DEFAULT_FACTORY |
7 | 7 | from common_library.pydantic_fields_extension import is_nullable |
8 | | -from models_library.basic_types import ( |
9 | | - BootModeEnum, |
10 | | - BuildTargetEnum, |
11 | | - LogLevel, |
12 | | - PortInt, |
13 | | - VersionTag, |
14 | | -) |
| 8 | +from models_library.basic_types import LogLevel, PortInt, VersionTag |
15 | 9 | from models_library.utils.change_case import snake_to_camel |
16 | 10 | from pydantic import ( |
17 | 11 | AliasChoices, |
|
22 | 16 | model_validator, |
23 | 17 | ) |
24 | 18 | from pydantic.fields import Field |
25 | | -from pydantic.types import PositiveInt |
26 | 19 | from servicelib.logging_utils_filtering import LoggerName, MessageSubstring |
27 | | -from settings_library.base import BaseCustomSettings |
| 20 | +from settings_library.application import BaseApplicationSettings |
28 | 21 | from settings_library.email import SMTPSettings |
29 | 22 | from settings_library.postgres import PostgresSettings |
30 | 23 | from settings_library.prometheus import PrometheusSettings |
|
60 | 53 | _logger = logging.getLogger(__name__) |
61 | 54 |
|
62 | 55 |
|
63 | | -class ApplicationSettings(BaseCustomSettings, MixinLoggingSettings): |
| 56 | +class ApplicationSettings(BaseApplicationSettings, MixinLoggingSettings): |
64 | 57 | # CODE STATICS --------------------------------------------------------- |
65 | 58 | API_VERSION: str = API_VERSION |
66 | 59 | APP_NAME: str = APP_NAME |
67 | 60 | API_VTAG: VersionTag = TypeAdapter(VersionTag).validate_python(API_VTAG) |
68 | 61 |
|
69 | | - # IMAGE BUILDTIME ------------------------------------------------------ |
70 | | - # @Makefile |
71 | | - SC_BUILD_DATE: str | None = None |
72 | | - SC_BUILD_TARGET: BuildTargetEnum | None = None |
73 | | - SC_VCS_REF: str | None = None |
74 | | - SC_VCS_URL: str | None = None |
75 | | - |
76 | | - # @Dockerfile |
77 | | - SC_BOOT_MODE: BootModeEnum | None = None |
78 | | - SC_HEALTHCHECK_TIMEOUT: Annotated[ |
79 | | - PositiveInt | None, |
80 | | - Field( |
81 | | - None, |
82 | | - description="If a single run of the check takes longer than timeout seconds " |
83 | | - "then the check is considered to have failed." |
84 | | - "It takes retries consecutive failures of the health check for the container to be considered unhealthy.", |
85 | | - ), |
86 | | - ] |
87 | | - SC_USER_ID: int | None = None |
88 | | - SC_USER_NAME: str | None = None |
89 | | - |
90 | 62 | # RUNTIME ----------------------------------------------------------- |
91 | 63 | # settings defined from environs defined when container runs |
92 | 64 | # |
|
0 commit comments