From c606be8c640d43da260ac1d457a3551150b3d85e Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sun, 11 Dec 2022 19:47:59 -0500 Subject: [PATCH] Passthrough runtime kwargs from `open_actor_cluster()` --- tractor/_clustering.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tractor/_clustering.py b/tractor/_clustering.py index 0775a22..93562fe 100644 --- a/tractor/_clustering.py +++ b/tractor/_clustering.py @@ -32,9 +32,12 @@ import tractor async def open_actor_cluster( modules: list[str], count: int = cpu_count(), - names: Optional[list[str]] = None, - start_method: Optional[str] = None, + names: list[str] | None = None, hard_kill: bool = False, + + # passed through verbatim to ``open_root_actor()`` + **runtime_kwargs, + ) -> AsyncGenerator[ dict[str, tractor.Portal], None, @@ -49,7 +52,9 @@ async def open_actor_cluster( raise ValueError( 'Number of names is {len(names)} but count it {count}') - async with tractor.open_nursery(start_method=start_method) as an: + async with tractor.open_nursery( + **runtime_kwargs, + ) as an: async with trio.open_nursery() as n: uid = tractor.current_actor().uid