From 430047078610015b35243df534b4bb88d425f826 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 15 Nov 2022 18:10:51 -0500 Subject: [PATCH] Fix for empty tsdb query result case --- piker/data/feed.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/piker/data/feed.py b/piker/data/feed.py index 93630a13..f291c512 100644 --- a/piker/data/feed.py +++ b/piker/data/feed.py @@ -690,14 +690,13 @@ async def tsdb_backfill( timeframe=timeframe, ) + # empty query + if not len(tsdb_history): + break + next_start = tsdb_history['Epoch'][0] - if ( - not len(tsdb_history) # empty query - + if next_start >= tsdb_last_frame_start: # no earlier data detected - or next_start >= tsdb_last_frame_start - - ): break else: tsdb_last_frame_start = next_start