forked from goodboy/tractor
Ensure tuple for passed in arbiter addr
parent
82999d10df
commit
bb8452dbdb
|
@ -1,6 +1,7 @@
|
||||||
"""
|
"""
|
||||||
Spawning basics
|
Spawning basics
|
||||||
"""
|
"""
|
||||||
|
from typing import Dict, Tuple
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import trio
|
import trio
|
||||||
|
@ -11,7 +12,11 @@ from conftest import tractor_test
|
||||||
data_to_pass_down = {'doggy': 10, 'kitty': 4}
|
data_to_pass_down = {'doggy': 10, 'kitty': 4}
|
||||||
|
|
||||||
|
|
||||||
async def spawn(is_arbiter, data, arb_addr):
|
async def spawn(
|
||||||
|
is_arbiter: bool,
|
||||||
|
data: Dict,
|
||||||
|
arb_addr: Tuple[str, int],
|
||||||
|
):
|
||||||
namespaces = [__name__]
|
namespaces = [__name__]
|
||||||
|
|
||||||
await trio.sleep(0.1)
|
await trio.sleep(0.1)
|
||||||
|
|
|
@ -95,10 +95,10 @@ async def open_root_actor(
|
||||||
"Debug mode is only supported for the `trio` backend!"
|
"Debug mode is only supported for the `trio` backend!"
|
||||||
)
|
)
|
||||||
|
|
||||||
arbiter_addr = (host, port) = arbiter_addr or (
|
arbiter_addr = (host, port) = tuple(arbiter_addr or (
|
||||||
_default_arbiter_host,
|
_default_arbiter_host,
|
||||||
_default_arbiter_port
|
_default_arbiter_port,
|
||||||
)
|
))
|
||||||
|
|
||||||
loglevel = loglevel or log.get_loglevel()
|
loglevel = loglevel or log.get_loglevel()
|
||||||
if loglevel is not None:
|
if loglevel is not None:
|
||||||
|
|
Loading…
Reference in New Issue