From 29b6b3e54fec4e39bf9842ef33e0d758271dea45 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 10 Nov 2022 01:42:05 -0500 Subject: [PATCH] Port `storesh` cli-cmd machinery to `Flume` apis --- piker/data/marketstore.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/piker/data/marketstore.py b/piker/data/marketstore.py index 096c9745..2a088bc5 100644 --- a/piker/data/marketstore.py +++ b/piker/data/marketstore.py @@ -661,7 +661,7 @@ async def tsdb_history_update( [fqsn], start_stream=False, - ) as (feed, stream), + ) as feed, ): profiler(f'opened feed for {fqsn}') @@ -669,12 +669,13 @@ async def tsdb_history_update( # to_prepend = None if fqsn: - symbol = feed.symbols.get(fqsn) + flume = feed.flumes[fqsn] + symbol = flume.symbol if symbol: - fqsn = symbol.front_fqsn() + fqsn = symbol.fqsn # diff db history with shm and only write the missing portions - # ohlcv = feed.hist_shm.array + # ohlcv = flume.hist_shm.array # TODO: use pg profiler # for secs in (1, 60):