Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- headers = {
- 'Authorization': 'Bearer {0}'.format(token),
- }
- qsargs = {
- 'select': '*',
- 'limit': 1000,
- }
- while True:
- response = requests.get(url, params=qsargs, headers=headers)
- data = response.json()
- for app in data['model']:
- yield app
- if '_next' in data:
- url = data['_next']['model']['nextUrl']
- qsargs = None
- else:
- return
- eapp_name = eapp['name'].strip()
- futures = list()
- with ThreadPoolExecutor(max_workers=5) as executor:
- for app in get_applications(token):
- # future = executor.submit(update_application, app)
- # futures.append(future)
- update_application(token, app)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement