Break backfill loop on `end_dt < start_dt`

ib_py311_fixes
Tyler Goodlet 2023-08-29 08:43:14 -04:00
parent 8369f557c7
commit ad37cfbe2f
1 changed files with 6 additions and 0 deletions

View File

@ -418,6 +418,12 @@ async def start_backfill(
start_dt = from_timestamp(start)
end_dt = from_timestamp(end)
# if we get a baddly ordered timestamp
# pair, imeeditately stop backfilling.
if end_dt < start_dt:
break
(
array,
next_start_dt,