Cleanup some code

This commit is contained in:
Matthias
2023-04-17 19:55:58 +02:00
parent b2ea464250
commit 14bca509da

View File

@@ -2396,13 +2396,13 @@ class Exchange:
else: else:
logger.info("Using cached leverage_tiers.") logger.info("Using cached leverage_tiers.")
async def gather_results(): async def gather_results(input_coro):
return await asyncio.gather(*input_coro, return_exceptions=True) return await asyncio.gather(*input_coro, return_exceptions=True)
for input_coro in chunks(coros, 100): for input_coro in chunks(coros, 100):
with self._loop_lock: with self._loop_lock:
results = self.loop.run_until_complete(gather_results()) results = self.loop.run_until_complete(gather_results(input_coro))
for res in results: for res in results:
if isinstance(res, Exception): if isinstance(res, Exception):