多线程

This commit is contained in:
2026-01-27 09:08:34 +08:00
parent 8cb7a50bb9
commit 6cafaa4ab7
3 changed files with 343 additions and 10 deletions

View File

@@ -312,6 +312,7 @@ def reload_config() -> dict:
global PROXY_ENABLED, PROXIES
global S2A_API_BASE, S2A_ADMIN_KEY, S2A_ADMIN_TOKEN
global S2A_CONCURRENCY, S2A_PRIORITY, S2A_GROUP_NAMES, S2A_GROUP_IDS
global CONCURRENT_ENABLED, CONCURRENT_WORKERS
result = {
"success": True,
@@ -349,6 +350,11 @@ def reload_config() -> dict:
_account = _cfg.get("account", {})
ACCOUNTS_PER_TEAM = _account.get("accounts_per_team", 4)
# 并发配置
_concurrent = _cfg.get("concurrent", {})
CONCURRENT_ENABLED = _concurrent.get("enabled", False)
CONCURRENT_WORKERS = _concurrent.get("workers", 4)
# GPTMail 配置
_gptmail = _cfg.get("gptmail", {})
GPTMAIL_PREFIX = _gptmail.get("prefix", "")
@@ -600,6 +606,11 @@ _account = _cfg.get("account", {})
DEFAULT_PASSWORD = _account.get("default_password", "kfcvivo50")
ACCOUNTS_PER_TEAM = _account.get("accounts_per_team", 4)
# 并发处理配置
_concurrent = _cfg.get("concurrent", {})
CONCURRENT_ENABLED = _concurrent.get("enabled", False) # 是否启用并发处理
CONCURRENT_WORKERS = _concurrent.get("workers", 4) # 并发数量 (浏览器实例数)
# 注册
_reg = _cfg.get("register", {})
REGISTER_NAME = _reg.get("name", "test")