数据库管理器单例模式

This commit is contained in:
liuwei
2025-03-19 09:55:08 +08:00
parent 85d3f06baf
commit d2e7ca8976
7 changed files with 41 additions and 25 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ class StatsCollectorPlugin(PluginInterface):
}
self.event_manager = EventManager.get_instance()
self.db_manager = DBConnectionManager()
self.db_manager = DBConnectionManager.get_instance()
self.stats_db = StatsDBOperator(self.db_manager)
def initialize(self, config: Dict[str, Any]) -> bool: