From 3f9019a1ad81478e3b1017982c4abc0a2e88ea46 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 5 May 2024 19:51:52 +0200 Subject: [PATCH] Don't use coro directly --- freqtrade/exchange/exchange.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index eed852e7c..bd847cffc 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -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):