prevents continous fetching every x bot_loop seconds , adheres to refresh_period, in case the pairlist returned from the remote end is empty.
This commit is contained in:
parent
2131205db6
commit
44bf59668b
@ -142,6 +142,9 @@ class RemotePairList(IPairList):
|
||||
"""
|
||||
|
||||
if self._init_done:
|
||||
if self._pair_cache.get('pairlist') == ["Empty"]:
|
||||
return []
|
||||
else:
|
||||
pairlist = self._pair_cache.get('pairlist')
|
||||
else:
|
||||
pairlist = []
|
||||
@ -181,7 +184,10 @@ class RemotePairList(IPairList):
|
||||
pairlist = self._whitelist_for_active_markets(pairlist)
|
||||
pairlist = pairlist[:self._number_pairs]
|
||||
|
||||
if pairlist:
|
||||
self._pair_cache['pairlist'] = pairlist.copy()
|
||||
else:
|
||||
self._pair_cache['pairlist'] = ["Empty"]
|
||||
|
||||
if time_elapsed != 0.0:
|
||||
self.log_once(f'Pairlist Fetched in {time_elapsed} seconds.', logger.info)
|
||||
|
Loading…
Reference in New Issue
Block a user