added fix to reduce amount of outdated messages

This commit is contained in:
Gert Wohlgemuth 2018-06-20 02:00:08 -07:00
parent 62d936e11d
commit 06c329abec

View File

@ -146,10 +146,11 @@ class Analyze(object):
latest = dataframe.iloc[-1] latest = dataframe.iloc[-1]
# Check if dataframe is out of date # Check if dataframe is out of date
signal_date = arrow.get(latest['date']) signal_date = arrow.get(latest['date'])
interval_minutes = constants.TICKER_INTERVAL_MINUTES[interval] interval_minutes = constants.TICKER_INTERVAL_MINUTES[interval]
if signal_date < arrow.utcnow() - timedelta(minutes=(interval_minutes + 5)): if signal_date < (arrow.utcnow() - timedelta(minutes=(interval_minutes + 5))):
logger.warning( logger.warning(
'Outdated history for pair %s. Last tick is %s minutes old', 'Outdated history for pair %s. Last tick is %s minutes old',
pair, pair,