0.2.1
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
# 0.2.1
|
||||||
|
- 修复自动化代码 处理异常情况
|
||||||
# 0.2.0
|
# 0.2.0
|
||||||
- 优化自动化代码 提高容错
|
- 优化自动化代码 提高容错
|
||||||
# 0.1.9
|
# 0.1.9
|
||||||
|
|||||||
@@ -760,7 +760,8 @@ def main():
|
|||||||
time.sleep(secs)
|
time.sleep(secs)
|
||||||
continue
|
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}
|
futures_map = {executor.submit(proxy_loop, p, stop_event): p for p in proxies}
|
||||||
|
|
||||||
monitor_thread = threading.Thread(
|
monitor_thread = threading.Thread(
|
||||||
@@ -778,7 +779,6 @@ def main():
|
|||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
break
|
break
|
||||||
# 进入禁跑时段时,立即停止并清理浏览器
|
|
||||||
if is_forbidden_time():
|
if is_forbidden_time():
|
||||||
logger.info("进入禁跑时段,停止当前批次并清理指纹浏览器")
|
logger.info("进入禁跑时段,停止当前批次并清理指纹浏览器")
|
||||||
stop_event.set()
|
stop_event.set()
|
||||||
@@ -806,6 +806,11 @@ def main():
|
|||||||
monitor_thread.join(timeout=5)
|
monitor_thread.join(timeout=5)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
finally:
|
||||||
|
try:
|
||||||
|
executor.shutdown(wait=False)
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user