0.2.1
This commit is contained in:
@@ -760,7 +760,8 @@ def main():
|
||||
time.sleep(secs)
|
||||
continue
|
||||
|
||||
with ThreadPoolExecutor(max_workers=len(proxies)) as executor:
|
||||
executor = ThreadPoolExecutor(max_workers=len(proxies))
|
||||
try:
|
||||
futures_map = {executor.submit(proxy_loop, p, stop_event): p for p in proxies}
|
||||
|
||||
monitor_thread = threading.Thread(
|
||||
@@ -778,7 +779,6 @@ def main():
|
||||
except Exception:
|
||||
pass
|
||||
break
|
||||
# 进入禁跑时段时,立即停止并清理浏览器
|
||||
if is_forbidden_time():
|
||||
logger.info("进入禁跑时段,停止当前批次并清理指纹浏览器")
|
||||
stop_event.set()
|
||||
@@ -806,6 +806,11 @@ def main():
|
||||
monitor_thread.join(timeout=5)
|
||||
except Exception:
|
||||
pass
|
||||
finally:
|
||||
try:
|
||||
executor.shutdown(wait=False)
|
||||
except Exception:
|
||||
pass
|
||||
continue
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user