Advertisement
Guest User

Untitled

a guest
Jul 20th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. await asyncio.gather(*[sync_users(user, api, batch) for batch in batches], return_exceptions=False)
  2.  
  3. loop = asyncio.get_event_loop()
  4. executor = ThreadPoolExecutor(max_workers=5)
  5. results = await loop.run_in_executor(executor, api.UsersLookup(user_id=batch, include_entities=True))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement