Port `storesh` cli-cmd machinery to `Flume` apis

agg_feedz
Tyler Goodlet 2022-11-10 01:42:05 -05:00
parent 8a01c9e42b
commit 29b6b3e54f
1 changed files with 5 additions and 4 deletions

View File

@ -661,7 +661,7 @@ async def tsdb_history_update(
[fqsn], [fqsn],
start_stream=False, start_stream=False,
) as (feed, stream), ) as feed,
): ):
profiler(f'opened feed for {fqsn}') profiler(f'opened feed for {fqsn}')
@ -669,12 +669,13 @@ async def tsdb_history_update(
# to_prepend = None # to_prepend = None
if fqsn: if fqsn:
symbol = feed.symbols.get(fqsn) flume = feed.flumes[fqsn]
symbol = flume.symbol
if symbol: if symbol:
fqsn = symbol.front_fqsn() fqsn = symbol.fqsn
# diff db history with shm and only write the missing portions # 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 # TODO: use pg profiler
# for secs in (1, 60): # for secs in (1, 60):