File tree Expand file tree Collapse file tree 3 files changed +8
-17
lines changed
services/api-server/src/simcore_service_api_server Expand file tree Collapse file tree 3 files changed +8
-17
lines changed Original file line number Diff line number Diff line change 44
55from fastapi import Depends
66from fastapi .requests import Request
7+ from simcore_postgres_database .utils_aiosqlalchemy import ( # type: ignore[import-not-found] # this on is unclear
8+ get_pg_engine_stateinfo ,
9+ )
710from sqlalchemy .ext .asyncio import AsyncEngine
811
912from ...clients .postgres import get_engine
@@ -25,6 +28,11 @@ async def _get_repo(
2528 # 2nd one was acquiring a connection per request which works but blocks the director-v2 responsiveness once
2629 # the max amount of connections is reached
2730 # now the current solution is to acquire connection when needed.
31+ _logger .debug (
32+ "Setting up a repository. Current state of connections: %s" ,
33+ await get_pg_engine_stateinfo (engine ),
34+ )
35+
2836 yield repo_type (db_engine = engine )
2937
3038 return _get_repo
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments