fixed bot and server connectivity issues

This commit is contained in:
2025-12-24 04:38:38 +03:00
parent dfc188e179
commit 169d874dad
10 changed files with 149 additions and 29 deletions
+2 -6
View File
@@ -39,13 +39,9 @@ from src.application.use_cases.rag_use_cases import RAGUseCases
class DatabaseProvider(Provider):
@provide(scope=Scope.REQUEST)
@asynccontextmanager
async def get_db(self) -> AsyncSession:
async with AsyncSessionLocal() as session:
try:
yield session
finally:
await session.close()
session = AsyncSessionLocal()
return session
class RepositoryProvider(Provider):