mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-02-06 06:10:24 +00:00
Merge pull request #8491 from Bloodhunter4rc/remotepairlist
Remotepairlist - fix continous fetching every x bot_loop seconds
This commit is contained in:
@@ -143,6 +143,9 @@ class RemotePairList(IPairList):
|
||||
|
||||
if self._init_done:
|
||||
pairlist = self._pair_cache.get('pairlist')
|
||||
if pairlist == [None]:
|
||||
# Valid but empty pairlist.
|
||||
return []
|
||||
else:
|
||||
pairlist = []
|
||||
|
||||
@@ -181,7 +184,11 @@ class RemotePairList(IPairList):
|
||||
pairlist = self._whitelist_for_active_markets(pairlist)
|
||||
pairlist = pairlist[:self._number_pairs]
|
||||
|
||||
self._pair_cache['pairlist'] = pairlist.copy()
|
||||
if pairlist:
|
||||
self._pair_cache['pairlist'] = pairlist.copy()
|
||||
else:
|
||||
# If pairlist is empty, set a dummy value to avoid fetching again
|
||||
self._pair_cache['pairlist'] = [None]
|
||||
|
||||
if time_elapsed != 0.0:
|
||||
self.log_once(f'Pairlist Fetched in {time_elapsed} seconds.', logger.info)
|
||||
|
||||
Reference in New Issue
Block a user