log how old the last received tick is
This commit is contained in:
parent
35c51c73f7
commit
5e73f3431c
@ -112,8 +112,9 @@ 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.now() - timedelta(minutes=(interval + 5)):
|
||||
logger.warning('Too old dataframe for pair %s', pair)
|
||||
if signal_date < arrow.utcnow() - timedelta(minutes=(interval + 5)):
|
||||
logger.warning('Too old dataframe for pair %s. Last ticker is %s minutes old',
|
||||
pair, (arrow.utcnow() - signal_date).seconds // 60)
|
||||
return (False, False) # return False ?
|
||||
|
||||
(buy, sell) = latest[SignalType.BUY.value] == 1, latest[SignalType.SELL.value] == 1
|
||||
|
Loading…
Reference in New Issue
Block a user