From 646d1f73161a308c9b77e4fabc7287683d408b48 Mon Sep 17 00:00:00 2001 From: Janne Sinivirta Date: Sat, 24 Feb 2018 19:25:08 +0200 Subject: [PATCH] better log message for outdated history --- freqtrade/analyze.py | 2 +- freqtrade/tests/test_analyze.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/analyze.py b/freqtrade/analyze.py index 18b4e25f7..b056cdf80 100644 --- a/freqtrade/analyze.py +++ b/freqtrade/analyze.py @@ -113,7 +113,7 @@ def get_signal(pair: str, interval: int) -> (bool, bool): # Check if dataframe is out of date signal_date = arrow.get(latest['date']) if signal_date < arrow.utcnow() - timedelta(minutes=(interval + 5)): - logger.warning('Too old dataframe for pair %s. Last ticker is %s minutes old', + logger.warning('Outdated history for pair %s. Last tick is %s minutes old', pair, (arrow.utcnow() - signal_date).seconds // 60) return (False, False) # return False ? diff --git a/freqtrade/tests/test_analyze.py b/freqtrade/tests/test_analyze.py index dc40572b6..5b9b68a9f 100644 --- a/freqtrade/tests/test_analyze.py +++ b/freqtrade/tests/test_analyze.py @@ -104,7 +104,7 @@ def test_get_signal_old_dataframe(default_conf, mocker, caplog): ticks = DataFrame([{'buy': 1, 'date': oldtime}]) mocker.patch('freqtrade.analyze.analyze_ticker', return_value=DataFrame(ticks)) assert (False, False) == get_signal('xyz', int(default_conf['ticker_interval'])) - assert tt.log_has('Too old dataframe for pair xyz. Last ticker is 11 minutes old', + assert tt.log_has('Outdated history for pair xyz. Last tick is 11 minutes old', caplog.record_tuples)