Migrate from github to gitea + some improvements

This commit is contained in:
2022-09-18 00:39:03 +02:00
parent 594b532fe7
commit 7595d42f9a
15 changed files with 44 additions and 74 deletions

View File

@@ -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()