Always overwrite tsdb duplicates found during backfill
Enable the previously commented-out dedupe-and-write logic in `start_backfill()` to ensure tsdb stays clean of duplicate entries. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-codemultiaddrs
parent
f11ab5f0aa
commit
205058de21
|
|
@ -708,8 +708,16 @@ async def start_backfill(
|
||||||
deduped,
|
deduped,
|
||||||
diff,
|
diff,
|
||||||
) = dedupe(df)
|
) = dedupe(df)
|
||||||
# if diff:
|
if diff:
|
||||||
# sort_diff(df)
|
log.warning(
|
||||||
|
f'Found {diff} duplicates in tsdb, '
|
||||||
|
f'overwriting with deduped data\n'
|
||||||
|
)
|
||||||
|
await storage.write_ohlcv(
|
||||||
|
col_sym_key,
|
||||||
|
deduped,
|
||||||
|
timeframe,
|
||||||
|
)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# finally filled gap
|
# finally filled gap
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue