mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 00:23:07 +00:00
improve ws "removing" condition
This commit is contained in:
@@ -74,7 +74,10 @@ class ExchangeWS:
|
|||||||
_, timeframe, _ = p
|
_, timeframe, _ = p
|
||||||
timeframe_s = timeframe_to_seconds(timeframe)
|
timeframe_s = timeframe_to_seconds(timeframe)
|
||||||
last_refresh = self.klines_last_request.get(p, 0)
|
last_refresh = self.klines_last_request.get(p, 0)
|
||||||
if last_refresh > 0 and dt_ts() - last_refresh > timeframe_s + 20:
|
if (
|
||||||
|
last_refresh > 0
|
||||||
|
and (dt_ts() - last_refresh) > ((timeframe_s + 20) * 1000)
|
||||||
|
):
|
||||||
logger.info(f"Removing {p} from watchlist")
|
logger.info(f"Removing {p} from watchlist")
|
||||||
self._klines_watching.discard(p)
|
self._klines_watching.discard(p)
|
||||||
changed = True
|
changed = True
|
||||||
|
|||||||
Reference in New Issue
Block a user