Don't use coro directly

This commit is contained in:
Matthias 2024-05-05 19:51:52 +02:00
parent c3516dbba6
commit 3f9019a1ad

View File

@ -2145,11 +2145,11 @@ class Exchange:
results_df = {}
# Chunk requests into batches of 100 to avoid overwhelming ccxt Throttling
for input_coro in chunks(input_coroutines, 100):
async def gather_stuff():
return await asyncio.gather(*input_coro, return_exceptions=True)
async def gather_stuff(coro):
return await asyncio.gather(*coro, return_exceptions=True)
with self._loop_lock:
results = self.loop.run_until_complete(gather_stuff())
results = self.loop.run_until_complete(gather_stuff(input_coro))
for res in results:
if isinstance(res, Exception):