bd setting

This commit is contained in:
cheykrym 2026-03-20 00:00:02 +03:00
parent 45618ebb61
commit e877d0a4dc
2 changed files with 11 additions and 2 deletions

View File

@ -3,7 +3,16 @@ from sqlalchemy.orm import declarative_base
from config import settings # поправил импорт — без .config
# Создаем асинхронный движок
engine = create_async_engine(settings.DATABASE_URL, echo=False, future=True)
engine = create_async_engine(
settings.DATABASE_URL,
echo=False,
future=True,
pool_size=5,
max_overflow=5,
pool_timeout=30,
pool_recycle=1800,
pool_pre_ping=True,
)
# Создаем фабрику сессий
AsyncSessionLocal = async_sessionmaker(

View File

@ -1,6 +1,6 @@
[project]
name = "common-lib"
version = "0.0.42"
version = "0.0.43"
description = "Библиотека общих компонентов для микросервисов yobble"
authors = [{ name = "cheykrym", email = "you@example.com" }]
license = "MIT"