mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
Handle individual exceptions when initializing leverage tiers
closes #8515 closes #8512 closes #8514
This commit is contained in:
@@ -2404,16 +2404,17 @@ class Exchange:
|
||||
with self._loop_lock:
|
||||
results = self.loop.run_until_complete(gather_results())
|
||||
|
||||
for symbol, res in results:
|
||||
tiers[symbol] = res
|
||||
for res in results:
|
||||
if isinstance(res, Exception):
|
||||
logger.warning(f"Leverage tier exception: {repr(res)}")
|
||||
continue
|
||||
symbol, tier = res
|
||||
tiers[symbol] = tier
|
||||
if len(coros) > 0:
|
||||
self.cache_leverage_tiers(tiers, self._config['stake_currency'])
|
||||
logger.info(f"Done initializing {len(symbols)} markets.")
|
||||
|
||||
return tiers
|
||||
else:
|
||||
return {}
|
||||
else:
|
||||
return {}
|
||||
|
||||
def cache_leverage_tiers(self, tiers: Dict[str, List[Dict]], stake_currency: str) -> None:
|
||||
|
||||
Reference in New Issue
Block a user