Fix parsing phone and add redis storage for FSM in telegram bot
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from pydantic import BaseModel
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
from .notifications import NotificationsSettings
|
||||
@@ -6,6 +7,11 @@ from .telegram_bot.polling import TelegramBotPollingSettings
|
||||
from .telegram_bot.webhook import TelegramBotWebhookSettings
|
||||
|
||||
|
||||
class LoggingSettings(BaseModel):
|
||||
level: str = "INFO"
|
||||
format: str = "{time}|{level:>8}|{message}"
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
model_config = SettingsConfigDict(
|
||||
env_prefix="BIRTHDAY_POOL_BOT__",
|
||||
@@ -13,6 +19,7 @@ class Settings(BaseSettings):
|
||||
extra="ignore",
|
||||
)
|
||||
|
||||
logging: LoggingSettings = LoggingSettings()
|
||||
repository: RepositorySettings = RepositorySettings()
|
||||
telegram_bot: (
|
||||
TelegramBotPollingSettings |
|
||||
|
||||
Reference in New Issue
Block a user