diff --git a/examples/multihost/tipc_cluster/host_a_srv.py b/examples/multihost/tipc_cluster/host_a_srv.py index 7f586166..c7b9f562 100644 --- a/examples/multihost/tipc_cluster/host_a_srv.py +++ b/examples/multihost/tipc_cluster/host_a_srv.py @@ -47,14 +47,16 @@ async def main() -> None: reg: TIPCAddress = TIPCAddress.get_root() print(f'host A publishing {reg}') - async with tractor.open_root_actor( - name='host_a', + async with tractor.open_nursery( enable_transports=['tipc'], registry_addrs=[reg.unwrap()], - enable_modules=[__name__], - ): + ) as an: + await an.start_actor( + 'host_a', + enable_modules=[__name__], + ) print( - 'registrar up — `tipc nametable show` on EITHER host\n' + 'host_a up — `tipc nametable show` on EITHER host\n' 'should now list this service. ctrl-c to stop.' ) await trio.sleep_forever() diff --git a/examples/multihost/tipc_cluster/host_b_client.py b/examples/multihost/tipc_cluster/host_b_client.py index 966445a3..1e5ea7b9 100644 --- a/examples/multihost/tipc_cluster/host_b_client.py +++ b/examples/multihost/tipc_cluster/host_b_client.py @@ -16,6 +16,7 @@ from __future__ import annotations import trio import tractor +from host_a_srv import echo from tractor.ipc._tipc import ( TIPCAddress, is_tipc_available, @@ -41,7 +42,7 @@ async def main() -> None: async with ( ptl.open_context( - 'host_a_srv:echo', + echo, ) as (ctx, _), ctx.open_stream() as stream, ):