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
# 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