From 0dc152e0656e1eec04b96e3a68890c70bb0baae0 Mon Sep 17 00:00:00 2001 From: "C.C" Date: Mon, 18 Nov 2024 14:16:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=AD=BE=E5=88=B0=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=BA=BF=E7=A8=8B=E6=B1=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/plugins/modules/autosignin.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/plugins/modules/autosignin.py b/app/plugins/modules/autosignin.py index d1a9cc2b..c595421c 100644 --- a/app/plugins/modules/autosignin.py +++ b/app/plugins/modules/autosignin.py @@ -1,11 +1,10 @@ +from concurrent.futures import ThreadPoolExecutor import copy import re import json from datetime import datetime, timedelta -from multiprocessing.dummy import Pool as ThreadPool from threading import Event from time import sleep -from urllib.parse import urlsplit import pytz from lxml import etree @@ -342,7 +341,7 @@ def sign_in(self, event=None): sign_sites = new_sign_sites # 执行签到 self.info("开始执行签到任务") - with ThreadPool(min(len(sign_sites), int(self._queue_cnt) if self._queue_cnt else 10)) as p: + with ThreadPoolExecutor(min(len(sign_sites), int(self._queue_cnt) if self._queue_cnt else 10)) as p: status = p.map(self.signin_site, sign_sites) if status: