Just wipe wrong timeframe filled tsdb colseries for now

ib_1m_hist
Tyler Goodlet 2022-10-28 15:55:04 -04:00
parent fb4f1732b6
commit df16726211
1 changed files with 14 additions and 6 deletions

View File

@ -469,13 +469,21 @@ class Storage:
time_step = time[-1] - time[-2] time_step = time[-1] - time[-2]
ts = tf_in_1s.inverse[data_set.timeframe] ts = tf_in_1s.inverse[data_set.timeframe]
assert time_step == ts if time_step != ts:
log.warning(
f'MKTS BUG: wrong timeframe loaded: {time_step}'
'YOUR DATABASE LIKELY CONTAINS BAD DATA FROM AN OLD BUG'
f'WIPING HISTORY FOR {ts}s'
)
await self.delete_ts(fqsn, timeframe)
# if time_step != ts: # try reading again..
# log.warning(f'MKTS BUG: wrong timeframe loaded: {time_step}') return await self.read_ohlcv(
# if timeframe == 1: fqsn,
# await tractor.breakpoint() timeframe,
# return {} end,
limit,
)
return array return array