优化白名单逻辑

This commit is contained in:
yml2213
2026-06-25 08:19:18 +08:00
parent ef12dcf4a3
commit a62e7c192f
2 changed files with 33 additions and 16 deletions
+6
View File
@@ -186,6 +186,12 @@ class LoginBatchRunner:
concurrency = self.concurrency
self._push_log("info", f"批量登录任务 {batch_id} 开始,共 {len(self.account_ids)} 个账号,并发数: {concurrency}")
# 批次开始前同步一次出口 IP 到白名单,后续 fetch_new_proxy 不再主动同步
if self._shared_proxy_fetcher:
ok, msg = self._shared_proxy_fetcher.warmup_whitelist()
if msg != "无白名单凭据,跳过":
self._push_log("info" if ok else "warning", f"白名单预热: {msg}")
try:
# 创建或复用任务记录(顺序执行,线程安全)
task_infos: list[dict] = [] # {task_id, acc_info}