From bf09eab53d2d2b53572eed6e3ff16b451d2e81b1 Mon Sep 17 00:00:00 2001 From: SXP-Simon Date: Sun, 8 Feb 2026 22:28:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=86=E5=8F=B2=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E4=B8=A2=E5=A4=B1=E7=9A=84=20max=5Fconcurrent=5Ftasks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/config.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/core/config.py b/src/core/config.py index 66460dd..d724fd3 100644 --- a/src/core/config.py +++ b/src/core/config.py @@ -182,8 +182,8 @@ class ConfigManager: """获取机器人自身的 ID 列表 (兼容 bot_qq_ids)""" ids = self.config.get("bot_self_ids", []) if not ids: - # 向后兼容 bot_qq_ids - ids = self.config.get("bot_qq_ids", []) + # 向后兼容 bot_qq_ids + ids = self.config.get("bot_qq_ids", []) return ids def get_bot_qq_ids(self) -> list: @@ -285,6 +285,10 @@ class ConfigManager: self.config["group_list"] = groups self.config.save_config() + def get_max_concurrent_tasks(self) -> int: + """获取自动分析最大并发数""" + return self.config.get("max_concurrent_tasks", 3) + def set_max_concurrent_tasks(self, count: int): """设置自动分析最大并发数""" self.config["max_concurrent_tasks"] = count @@ -391,7 +395,7 @@ class ConfigManager: from playwright.async_api import async_playwright # noqa: F401 self._playwright_available = True - + # 检查版本 try: self._playwright_version = playwright.__version__