Migrate from github to gitea + some improvements
This commit is contained in:
@@ -64,10 +64,15 @@ token = requests.post(os.getenv("API_URL") + '/user/login', json={"email": usern
|
||||
|
||||
response = requests.get(os.getenv("API_URL") + '/symbols', headers={'Authorization': 'Bearer ' + token}).json()['data']
|
||||
|
||||
symbols = split(response, int(len(response) / 5))
|
||||
for symbol_list in symbols:
|
||||
for symbol in symbol_list:
|
||||
x = threading.Thread(target=thread_function, args=(symbol,))
|
||||
x.start()
|
||||
if len(response) > 5:
|
||||
symbols = split(response, int(len(response) / 5))
|
||||
for symbol_list in symbols:
|
||||
for symbol in symbol_list:
|
||||
x = threading.Thread(target=thread_function, args=(symbol,))
|
||||
x.start()
|
||||
|
||||
time.sleep(10)
|
||||
time.sleep(10)
|
||||
else:
|
||||
for symbol in response:
|
||||
x = threading.Thread(target=thread_function, args=(symbol,))
|
||||
x.start()
|
Reference in New Issue
Block a user