Move tsdb section to `service.tsdb.name` and get host from `.maddrs`

distribute_dis
Tyler Goodlet 2023-10-01 17:23:39 -04:00
parent 653348fcd8
commit a382f01c85
1 changed files with 6 additions and 3 deletions

View File

@ -177,7 +177,7 @@ async def open_storage_client(
# TODO: maybe not under a "network" section.. since # TODO: maybe not under a "network" section.. since
# no more chitty `marketstore`.. # no more chitty `marketstore`..
tsdbconf: dict = {} tsdbconf: dict = {}
service_section = conf.get('network') service_section = conf.get('service')
if ( if (
not backend not backend
and service_section and service_section
@ -186,8 +186,11 @@ async def open_storage_client(
# lookup backend tsdb module by name and load any user service # lookup backend tsdb module by name and load any user service
# settings for connecting to the tsdb service. # settings for connecting to the tsdb service.
backend: str = tsdbconf.pop('backend') backend: str = tsdbconf.pop(
tsdb_host: str = tsdbconf['host'] 'name',
def_backend,
)
tsdb_host: str = tsdbconf.get('maddrs', [])
if backend is None: if backend is None:
backend: str = def_backend backend: str = def_backend