From 8fb667686fcd0dd1240077ed034bb7087a2b2ce2 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 17 Jul 2023 01:24:45 -0400 Subject: [PATCH] Open symcaches as part of per-backend search spawning --- piker/ui/_app.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/piker/ui/_app.py b/piker/ui/_app.py index 644e7567..585ccb18 100644 --- a/piker/ui/_app.py +++ b/piker/ui/_app.py @@ -28,6 +28,7 @@ from ..service import maybe_spawn_brokerd from . import _event from ._exec import run_qtractor from ..data.feed import install_brokerd_search +from ..data._symcache import open_symcache from ..accounting import unpack_fqme from . import _search from ._chart import GodWidget @@ -56,7 +57,10 @@ async def load_provider_search( portal, brokermod, ), + open_symcache(brokermod) as symcache, ): + assert symcache + # keep search engine stream up until cancelled await trio.sleep_forever() @@ -99,6 +103,8 @@ async def _async_main( sbar = godwidget.window.status_bar starting_done = sbar.open_status('starting ze sexy chartz') + # NOTE: by default we load all "builtin" backends for search + # and that includes loading their symcaches if possible B) needed_brokermods: dict[str, ModuleType] = {} for fqme in syms: brokername, *_ = unpack_fqme(fqme)