Default spec registrar set as empty addr list

Since it probably IS sane to just assume a root-actor-as-registrar
listening on the localhost as a default, AND allows NOT expecting every
caller of `open_piker_runtime()` to not have to pass an addr set XD

This makes a bucha CLI shit work again after breakage due to no
default..
distribute_dis
Tyler Goodlet 2023-10-03 13:36:22 -04:00
parent 00c046c280
commit 363c8dfdb1
1 changed files with 3 additions and 1 deletions

View File

@ -56,7 +56,7 @@ def get_runtime_vars() -> dict[str, Any]:
@acm
async def open_piker_runtime(
name: str,
registry_addrs: list[tuple[str, int]],
registry_addrs: list[tuple[str, int]] = [],
enable_modules: list[str] = [],
loglevel: Optional[str] = None,
@ -93,6 +93,8 @@ async def open_piker_runtime(
'piker_vars'
] = tractor_runtime_overrides
# NOTE: if no registrar list passed used the default of just
# setting it as the root actor on localhost.
registry_addrs = (
registry_addrs
or [_default_reg_addr]