Cleanup: MB 2.0 Gap Analysis előtti állapot (adatok kizárva)
This commit is contained in:
@@ -3,11 +3,12 @@ from app.core.config import settings
|
||||
from typing import AsyncGenerator
|
||||
|
||||
engine = create_async_engine(
|
||||
settings.DATABASE_URL, # A te eredeti kulcsod
|
||||
echo=getattr(settings, "DEBUG", False),
|
||||
settings.DATABASE_URL,
|
||||
echo=False, # Termelésben ne legyen True a log-áradat miatt
|
||||
future=True,
|
||||
pool_size=20,
|
||||
max_overflow=10
|
||||
pool_size=30, # Megemelve a Researcher 15-20 szála miatt
|
||||
max_overflow=20, # Extra rugalmasság csúcsidőben
|
||||
pool_pre_ping=True # Megakadályozza a "Server closed connection" hibákat
|
||||
)
|
||||
|
||||
AsyncSessionLocal = async_sessionmaker(
|
||||
@@ -16,7 +17,7 @@ AsyncSessionLocal = async_sessionmaker(
|
||||
expire_on_commit=False,
|
||||
autoflush=False
|
||||
)
|
||||
# Ez a sor kell, mert a main.py és a többiek ezen a néven keresik
|
||||
|
||||
SessionLocal = AsyncSessionLocal
|
||||
|
||||
async def get_db() -> AsyncGenerator[AsyncSession, None]:
|
||||
|
||||
Reference in New Issue
Block a user