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-code
multiaddrs
Gud Boi 2026-01-30 14:46:23 -05:00
parent f11ab5f0aa
commit 205058de21
1 changed files with 10 additions and 2 deletions

View File

@ -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