This commit is contained in:
2025-11-30 00:30:56 +08:00
parent 9eeb1a3e79
commit bef82d41c8

View File

@@ -647,7 +647,7 @@ def proxy_loop(proxy: str, stop_event: threading.Event) -> None:
while not stop_event.is_set():
try:
if is_forbidden_time():
if stop_event.wait(timeout=60):
if stop_event.wait(timeout=300):
break
cleanup_all_browsers()
secs = seconds_until(20, 0)
@@ -779,7 +779,7 @@ def main():
restart_event = threading.Event()
if is_forbidden_time():
if stop_event.wait(timeout=60):
if stop_event.wait(timeout=300):
continue
cleanup_all_browsers()
secs = seconds_until(20, 0)
@@ -802,18 +802,18 @@ def main():
if restart_event.is_set():
stop_event.set()
try:
executor.shutdown(wait=False)
executor.shutdown(wait=True)
except Exception:
pass
break
if is_forbidden_time():
logger.info("进入禁跑时段,停止当前批次,等待1分钟后清理指纹浏览器")
logger.info("进入禁跑时段,停止当前批次,等待5分钟后清理指纹浏览器")
stop_event.set()
try:
executor.shutdown(wait=False)
executor.shutdown(wait=True)
except Exception:
pass
time.sleep(60)
time.sleep(300)
cleanup_all_browsers()
break
for f, proxy in list(futures_map.items()):
@@ -836,7 +836,7 @@ def main():
pass
finally:
try:
executor.shutdown(wait=False)
executor.shutdown(wait=True)
except Exception:
pass
continue