forked from goodboy/tractor
Decouple registery addresses from binding addresses
parent
1858fb6efc
commit
aba46b723b
|
@ -70,6 +70,9 @@ async def open_root_actor(
|
|||
# defaults are above
|
||||
arbiter_addr: tuple[str, int]|None = None,
|
||||
|
||||
# binding addrs for the transport layer server
|
||||
trans_bind_addrs: list[tuple[str, int]] = [(_default_host, _default_port)],
|
||||
|
||||
name: str|None = 'root',
|
||||
|
||||
# either the `multiprocessing` start method:
|
||||
|
@ -184,6 +187,8 @@ async def open_root_actor(
|
|||
)
|
||||
assert registry_addrs
|
||||
|
||||
assert trans_bind_addrs
|
||||
|
||||
loglevel = (
|
||||
loglevel
|
||||
or log._default_loglevel
|
||||
|
@ -273,8 +278,6 @@ async def open_root_actor(
|
|||
tuple(addr), # TODO: just drop this requirement?
|
||||
)
|
||||
|
||||
trans_bind_addrs: list[tuple[str, int]] = []
|
||||
|
||||
# Create a new local root-actor instance which IS NOT THE
|
||||
# REGISTRAR
|
||||
if ponged_addrs:
|
||||
|
@ -296,11 +299,6 @@ async def open_root_actor(
|
|||
loglevel=loglevel,
|
||||
enable_modules=enable_modules,
|
||||
)
|
||||
# DO NOT use the registry_addrs as the transport server
|
||||
# addrs for this new non-registar, root-actor.
|
||||
for host, port in ponged_addrs:
|
||||
# NOTE: zero triggers dynamic OS port allocation
|
||||
trans_bind_addrs.append((host, 0))
|
||||
|
||||
# Start this local actor as the "registrar", aka a regular
|
||||
# actor who manages the local registry of "mailboxes" of
|
||||
|
|
Loading…
Reference in New Issue