bd setting
This commit is contained in:
parent
45618ebb61
commit
e877d0a4dc
@ -3,7 +3,16 @@ from sqlalchemy.orm import declarative_base
|
|||||||
from config import settings # поправил импорт — без .config
|
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(
|
AsyncSessionLocal = async_sessionmaker(
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "common-lib"
|
name = "common-lib"
|
||||||
version = "0.0.42"
|
version = "0.0.43"
|
||||||
description = "Библиотека общих компонентов для микросервисов yobble"
|
description = "Библиотека общих компонентов для микросервисов yobble"
|
||||||
authors = [{ name = "cheykrym", email = "you@example.com" }]
|
authors = [{ name = "cheykrym", email = "you@example.com" }]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user