forked from goodboy/tractor
1
0
Fork 0

Module define default accept addr

dereg_on_channel_aclose
Tyler Goodlet 2020-08-08 20:58:04 -04:00
parent b3eba00c3a
commit 292513b353
1 changed files with 4 additions and 2 deletions

View File

@ -18,6 +18,8 @@ from . import _spawn
log = get_logger('tractor')
_default_bind_addr: Tuple[str, int] = ('127.0.0.1', 0)
class ActorNursery:
"""Spawn scoped subprocess actors.
@ -48,7 +50,7 @@ class ActorNursery:
self,
name: str,
*,
bind_addr: Tuple[str, int] = ('127.0.0.1', 0),
bind_addr: Tuple[str, int] = _default_bind_addr,
statespace: Optional[Dict[str, Any]] = None,
rpc_module_paths: List[str] = None,
loglevel: str = None, # set log level per subactor
@ -89,7 +91,7 @@ class ActorNursery:
name: str,
fn: typing.Callable,
*,
bind_addr: Tuple[str, int] = ('127.0.0.1', 0),
bind_addr: Tuple[str, int] = _default_bind_addr,
rpc_module_paths: Optional[List[str]] = None,
statespace: Dict[str, Any] = None,
loglevel: str = None, # set log level per subactor