Port to new setup routine name
parent
a82f43e3a5
commit
14c5fc24ec
|
@ -134,6 +134,8 @@ async def spawn_brokerd(
|
|||
**tractor_kwargs
|
||||
) -> tractor._portal.Portal:
|
||||
|
||||
from .data import _setup_persistent_brokerd
|
||||
|
||||
log.info(f'Spawning {brokername} broker daemon')
|
||||
|
||||
brokermod = get_brokermod(brokername)
|
||||
|
@ -152,6 +154,21 @@ async def spawn_brokerd(
|
|||
**tractor_kwargs
|
||||
)
|
||||
|
||||
# TODO: so i think this is the perfect use case for supporting
|
||||
# a cross-actor async context manager api instead of this
|
||||
# shoort-and-forget task spawned in the root nursery, we'd have an
|
||||
# async exit stack that we'd register the `portal.open_context()`
|
||||
# call with and then have the ability to unwind the call whenevs.
|
||||
|
||||
# non-blocking setup of brokerd service nursery
|
||||
_services.service_n.start_soon(
|
||||
partial(
|
||||
portal.run,
|
||||
_setup_persistent_brokerd,
|
||||
brokername=brokername,
|
||||
)
|
||||
)
|
||||
|
||||
return dname
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue