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