Merge pull request #456 from jblestang/fix_old_dataframe_detection_for_longer_tickers

Fixing wrong 'old dataframe detection mechanism' for long tickers
This commit is contained in:
Gérald LONLAS 2018-01-28 17:40:03 -08:00 committed by GitHub
commit aae8044150
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,7 +112,7 @@ def get_signal(pair: str, interval: int) -> (bool, bool):
# 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'])
if signal_date < arrow.now() - timedelta(minutes=10): if signal_date < arrow.now() - timedelta(minutes=(interval + 5)):
logger.warning('Too old dataframe for pair %s', pair) logger.warning('Too old dataframe for pair %s', pair)
return (False, False) # return False ? return (False, False) # return False ?