Fix DB issue 2s
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user