`.tsp._history`: drop `feed_is_live` syncing, another seg flag
The `await feed_is_live.wait()` is more or less pointless and would only cause slower startup afaig (as-far-as-i-grok) so i'm masking it here. This also removes the final `strict_exception_groups=False` use from the non-tests code base, flipping to the `tractor.trionics` collapser once and for all!hist_backfill_fixes
parent
4d50bebf11
commit
cca2b14548
|
@ -886,7 +886,7 @@ async def load_tsdb_hist(
|
|||
np.ndarray,
|
||||
DateTime,
|
||||
DateTime,
|
||||
] | None:
|
||||
]|None:
|
||||
# loads a (large) frame of data from the tsdb depending
|
||||
# on the db's query size limit; our "nativedb" (using
|
||||
# parquet) generally can load the entire history into mem
|
||||
|
@ -899,7 +899,7 @@ async def load_tsdb_hist(
|
|||
DateTime,
|
||||
]
|
||||
try:
|
||||
tsdb_entry: tuple | None = await storage.load(
|
||||
tsdb_entry: tuple|None = await storage.load(
|
||||
fqme,
|
||||
timeframe=timeframe,
|
||||
)
|
||||
|
@ -1046,12 +1046,15 @@ async def tsdb_backfill(
|
|||
last_tsdb_dt,
|
||||
) = tsdb_entry
|
||||
|
||||
# await tractor.pause()
|
||||
|
||||
# if there is a gap to backfill from the first
|
||||
# history frame until the last datum loaded from the tsdb
|
||||
# continue that now in the background
|
||||
async with trio.open_nursery(
|
||||
strict_exception_groups=False,
|
||||
) as tn:
|
||||
async with (
|
||||
tractor.trionics.collapse_eg(),
|
||||
trio.open_nursery() as tn,
|
||||
):
|
||||
|
||||
bf_done = await tn.start(
|
||||
partial(
|
||||
|
@ -1322,8 +1325,14 @@ async def manage_history(
|
|||
# TODO: maybe it should be a subpkg of `.data`?
|
||||
from piker import storage
|
||||
|
||||
storemod: ModuleType
|
||||
client: StorageClient
|
||||
tn: trio.Nursery
|
||||
async with (
|
||||
storage.open_storage_client() as (storemod, client),
|
||||
storage.open_storage_client() as (
|
||||
storemod,
|
||||
client,
|
||||
),
|
||||
|
||||
# NOTE: this nursery spawns a task per "timeframe" (aka
|
||||
# sampling period) data set since normally differently
|
||||
|
@ -1392,7 +1401,7 @@ async def manage_history(
|
|||
some_data_ready.set()
|
||||
|
||||
# wait for a live feed before starting the sampler.
|
||||
await feed_is_live.wait()
|
||||
# await feed_is_live.wait()
|
||||
|
||||
# yield back after client connect with filled shm
|
||||
task_status.started((
|
||||
|
|
Loading…
Reference in New Issue