From a382f01c850d6d31ac420eac57e5bdcc5d81ddf4 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sun, 1 Oct 2023 17:23:39 -0400 Subject: [PATCH] Move tsdb section to `service.tsdb.name` and get host from `.maddrs` --- piker/storage/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/piker/storage/__init__.py b/piker/storage/__init__.py index 6c96721d..7830efe5 100644 --- a/piker/storage/__init__.py +++ b/piker/storage/__init__.py @@ -177,7 +177,7 @@ async def open_storage_client( # TODO: maybe not under a "network" section.. since # no more chitty `marketstore`.. tsdbconf: dict = {} - service_section = conf.get('network') + service_section = conf.get('service') if ( not backend and service_section @@ -186,8 +186,11 @@ async def open_storage_client( # lookup backend tsdb module by name and load any user service # settings for connecting to the tsdb service. - backend: str = tsdbconf.pop('backend') - tsdb_host: str = tsdbconf['host'] + backend: str = tsdbconf.pop( + 'name', + def_backend, + ) + tsdb_host: str = tsdbconf.get('maddrs', []) if backend is None: backend: str = def_backend