Use collapser around root tn in `.async_main()`
Seems to cause the following test suites to fail however.. - 'test_advanced_faults.py::test_ipc_channel_break_during_stream' - 'test_advanced_faults.py::test_ipc_channel_break_during_stream' - 'test_clustering.py::test_empty_mngrs_input_raises' Also tweak some ctxc request logging content.strict_egs_everywhere
parent
f776c47cb4
commit
0a56f40bab
|
@ -74,6 +74,9 @@ from tractor.msg import (
|
||||||
pretty_struct,
|
pretty_struct,
|
||||||
types as msgtypes,
|
types as msgtypes,
|
||||||
)
|
)
|
||||||
|
from .trionics import (
|
||||||
|
collapse_eg,
|
||||||
|
)
|
||||||
from .ipc import (
|
from .ipc import (
|
||||||
Channel,
|
Channel,
|
||||||
# IPCServer, # causes cycles atm..
|
# IPCServer, # causes cycles atm..
|
||||||
|
@ -359,7 +362,7 @@ class Actor:
|
||||||
|
|
||||||
def pformat(
|
def pformat(
|
||||||
self,
|
self,
|
||||||
ds: str = ':',
|
ds: str = ': ',
|
||||||
indent: int = 0,
|
indent: int = 0,
|
||||||
privates: bool = False,
|
privates: bool = False,
|
||||||
) -> str:
|
) -> str:
|
||||||
|
@ -1471,10 +1474,12 @@ async def async_main(
|
||||||
# parent is kept alive as a resilient service until
|
# parent is kept alive as a resilient service until
|
||||||
# cancellation steps have (mostly) occurred in
|
# cancellation steps have (mostly) occurred in
|
||||||
# a deterministic way.
|
# a deterministic way.
|
||||||
async with trio.open_nursery(
|
root_tn: trio.Nursery
|
||||||
strict_exception_groups=False,
|
async with (
|
||||||
) as root_nursery:
|
collapse_eg(),
|
||||||
actor._root_n = root_nursery
|
trio.open_nursery() as root_tn,
|
||||||
|
):
|
||||||
|
actor._root_n = root_tn
|
||||||
assert actor._root_n
|
assert actor._root_n
|
||||||
|
|
||||||
ipc_server: _server.IPCServer
|
ipc_server: _server.IPCServer
|
||||||
|
@ -1605,7 +1610,7 @@ async def async_main(
|
||||||
# start processing parent requests until our channel
|
# start processing parent requests until our channel
|
||||||
# server is 100% up and running.
|
# server is 100% up and running.
|
||||||
if actor._parent_chan:
|
if actor._parent_chan:
|
||||||
await root_nursery.start(
|
await root_tn.start(
|
||||||
partial(
|
partial(
|
||||||
_rpc.process_messages,
|
_rpc.process_messages,
|
||||||
chan=actor._parent_chan,
|
chan=actor._parent_chan,
|
||||||
|
|
Loading…
Reference in New Issue