Добавлена ветка cosmetics

This commit is contained in:
grigorij
2026-07-31 13:07:25 +04:00
parent f289631645
commit d757352b8a
19 changed files with 108 additions and 337 deletions
+5 -17
View File
@@ -6,24 +6,12 @@ from typing import Optional
import asyncpg
from app.logger import logger
DB_HOST = os.getenv("DB_HOST", "10.0.77.9")
DB_PORT = int(os.getenv("DB_PORT", "5433"))
DB_USER = os.getenv("DB_USER", "spabot")
DB_PASSWORD = os.getenv("DB_PASSWORD")
DB_NAME = os.getenv("DB_NAME", "spabot")
if not DB_PASSWORD:
raise ValueError(
"DB_PASSWORD not set in environment. "
"Set it in .env or export DB_PASSWORD=your_password"
)
DB_CONFIG = {
"host": DB_HOST,
"port": DB_PORT,
"user": DB_USER,
"password": DB_PASSWORD,
"database": DB_NAME,
"host": os.getenv("DB_HOST", "10.0.77.9"),
"port": int(os.getenv("DB_PORT", "5432")),
"user": os.getenv("DB_USER", "spabot"),
"password": os.getenv("DB_PASSWORD", "spabot_password"),
"database": os.getenv("DB_NAME", "spabot"),
}