Commit b506d248 authored by wang's avatar wang

1

parent 7422ad72
Pipeline #470 canceled with stages
...@@ -19,6 +19,11 @@ root_logger.handlers = [] ...@@ -19,6 +19,11 @@ root_logger.handlers = []
if not pathlib.Path('nacos-data/snapshot/').exists(): if not pathlib.Path('nacos-data/snapshot/').exists():
pathlib.Path('nacos-data/snapshot/').mkdir(parents=True) pathlib.Path('nacos-data/snapshot/').mkdir(parents=True)
def check_pull():
get_url = 'https://ymx-lcc.unififi.com/header/task/pull/cookieY4?brush_name=test'
r = requests.get(get_url)
return r.json()
def get_proxy(): def get_proxy():
get_proxy_url = 'http://ymx-lcc.unififi.com/proxy/get-proxy' get_proxy_url = 'http://ymx-lcc.unififi.com/proxy/get-proxy'
r = requests.post(get_proxy_url, json={ r = requests.post(get_proxy_url, json={
...@@ -61,6 +66,10 @@ def run(): ...@@ -61,6 +66,10 @@ def run():
while True: while True:
print(f'本次并发数 {brush_thread}') print(f'本次并发数 {brush_thread}')
pull = check_pull()
if pull.get('status') == 1:
time.sleep(10)
continue
# pool = ThreadPoolExecutor(max_workers=brush_thread) # pool = ThreadPoolExecutor(max_workers=brush_thread)
# all_task = [pool.submit(exec, (i)) for i in range(brush_group)] # all_task = [pool.submit(exec, (i)) for i in range(brush_group)]
# brush_check = CONFIG['internal']['reverse']['making']['brush_check'] # brush_check = CONFIG['internal']['reverse']['making']['brush_check']
...@@ -81,6 +90,7 @@ def run(): ...@@ -81,6 +90,7 @@ def run():
objs[n] = task objs[n] = task
if __name__ == '__main__': if __name__ == '__main__':
run() run()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment