Fix DB issue 2s

This commit is contained in:
Urtzi Alfaro
2025-09-30 21:58:10 +02:00
parent 147893015e
commit 7cc4b957a5
77 changed files with 4385 additions and 1211 deletions

View File

@@ -229,7 +229,7 @@ class DatabaseManager:
"current_checked_in": pool.checkedin() if pool else 0,
"current_checked_out": pool.checkedout() if pool else 0,
"current_overflow": pool.overflow() if pool else 0,
"invalid_connections": pool.invalid() if pool else 0
"invalid_connections": getattr(pool, 'invalid', lambda: 0)() if pool else 0
}
except Exception as e:
logger.error(f"Failed to get connection info: {e}", service=self.service_name)
@@ -357,4 +357,4 @@ async def get_legacy_db():
await session.rollback()
raise
finally:
await session.close()
await session.close()