Use pre-set reg addrs in `maybe_spawn_daemon()`
Pull actor-runtime `registry_addrs` from (the new)
`tractor.get_runtime_vars()` (over the previous hardcoding of
`('127.0.0.1', 6116)`..)) so that underlying `find_service()` and
`maybe_open_pikerd()` calls use the local actor's assigned registrar
endpoints.
Note, this is particularly necessary to get the `pytest` harness workin
again alongside any local running `pikerd` instance(s).
(this commit msg was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
repair_tests
parent
ced898f580
commit
3254f9233c
|
|
@ -79,10 +79,17 @@ async def maybe_spawn_daemon(
|
|||
lock = Services.locks[service_name]
|
||||
await lock.acquire()
|
||||
|
||||
if not pikerd_kwargs:
|
||||
# XXX NOTE, pin to apprope `tractor` branch!
|
||||
rtvs: dict = tractor.get_runtime_vars()
|
||||
registry_addrs: list[tuple] = list(
|
||||
map(tuple, rtvs['_registry_addrs'])
|
||||
)
|
||||
|
||||
try:
|
||||
async with find_service(
|
||||
service_name,
|
||||
registry_addrs=[('127.0.0.1', 6116)],
|
||||
registry_addrs=registry_addrs,
|
||||
) as portal:
|
||||
if portal is not None:
|
||||
lock.release()
|
||||
|
|
@ -99,6 +106,7 @@ async def maybe_spawn_daemon(
|
|||
# process tree
|
||||
async with maybe_open_pikerd(
|
||||
loglevel=loglevel,
|
||||
registry_addrs=registry_addrs,
|
||||
**pikerd_kwargs,
|
||||
|
||||
) as pikerd_portal:
|
||||
|
|
|
|||
Loading…
Reference in New Issue