refactor logging module, add welcome and reset daemons, changed structure of the rabbitmq queues

This commit is contained in:
2026-09-13 18:40:14 +03:00
parent b4e88a6ff4
commit a93c6d5fca
20 changed files with 374 additions and 58 deletions
+5
View File
@@ -26,6 +26,11 @@ class Env(Base):
RABBITMQ_PORT:int
RABBITMQ_PORT_UI:int
EMAIL_PORT:int
SMTP_SERVER:str
EMAIL_LOGIN:str
EMAIL_PASSWORD:str
PROD_MODE:bool
model_config=SettingsConfigDict(env_file="configs/.env", extra=None)
+24
View File
@@ -0,0 +1,24 @@
from pydantic import BaseModel
class QueueSpec(BaseModel):
name:str
routing_key:str
dlx_queue:str|None = None
class ExchangeSpec(BaseModel):
name:str
type:str = "topic"
queues: list[QueueSpec]
class Topology(BaseModel):
exchanges:list[ExchangeSpec]
email_topology=Topology(exchanges=[
ExchangeSpec(name="email", queues=[
QueueSpec(name="queue_welcome_email", routing_key="email.welcome", dlx_queue="queue_welcome_email.dlq"),
QueueSpec(name="queue_reset_email", routing_key="email.reset", dlx_queue="queue_reset_email.dlq"),
]),
])