Handle gaps greater then a frame within a frame
parent
8e08fb7b23
commit
30ddf63ec0
|
@ -221,12 +221,19 @@ def diff_history(
|
||||||
# write to shm.
|
# write to shm.
|
||||||
if (
|
if (
|
||||||
s_diff < 0
|
s_diff < 0
|
||||||
and abs(s_diff) < len(array)
|
|
||||||
):
|
):
|
||||||
# the + 1 is because ``last_tsdb_dt`` is pulled from
|
if abs(s_diff) < len(array):
|
||||||
# the last row entry for the ``'time'`` field retreived
|
# the + 1 is because ``last_tsdb_dt`` is pulled from
|
||||||
# from the tsdb.
|
# the last row entry for the ``'time'`` field retreived
|
||||||
to_push = array[abs(s_diff)+1:]
|
# from the tsdb.
|
||||||
|
to_push = array[abs(s_diff)+1:]
|
||||||
|
|
||||||
|
else:
|
||||||
|
# pass back only the portion of the array that is
|
||||||
|
# greater then the last time stamp in the tsdb.
|
||||||
|
time = array['time']
|
||||||
|
to_push = array[time >= last_tsdb_dt.timestamp()]
|
||||||
|
|
||||||
log.info(
|
log.info(
|
||||||
f'Pushing partial frame {to_push.size} to shm'
|
f'Pushing partial frame {to_push.size} to shm'
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue