Drop `loglevel` from `spawn_args` inputs to `maybe_spawn_daemon()`

rekt_pps
Tyler Goodlet 2023-04-04 13:45:52 -04:00
parent b2a5f8698d
commit 2d609dceac
2 changed files with 17 additions and 13 deletions

View File

@ -429,7 +429,7 @@ async def spawn_samplerd(
async def maybe_open_samplerd( async def maybe_open_samplerd(
loglevel: str | None = None, loglevel: str | None = None,
**kwargs, **pikerd_kwargs,
) -> tractor.Portal: # noqa ) -> tractor.Portal: # noqa
''' '''
@ -442,9 +442,9 @@ async def maybe_open_samplerd(
async with maybe_spawn_daemon( async with maybe_spawn_daemon(
dname, dname,
service_task_target=spawn_samplerd, service_task_target=spawn_samplerd,
spawn_args={'loglevel': loglevel}, spawn_args={},
loglevel=loglevel, loglevel=loglevel,
**kwargs, **pikerd_kwargs,
) as portal: ) as portal:
yield portal yield portal

View File

@ -57,11 +57,13 @@ async def maybe_spawn_daemon(
service_name: str, service_name: str,
service_task_target: Callable, service_task_target: Callable,
spawn_args: dict[str, Any],
loglevel: str | None = None,
spawn_args: dict[str, Any],
loglevel: str | None = None,
singleton: bool = False, singleton: bool = False,
**kwargs,
**pikerd_kwargs,
) -> tractor.Portal: ) -> tractor.Portal:
''' '''
@ -97,7 +99,7 @@ async def maybe_spawn_daemon(
# process tree # process tree
async with maybe_open_pikerd( async with maybe_open_pikerd(
loglevel=loglevel, loglevel=loglevel,
**kwargs, **pikerd_kwargs,
) as pikerd_portal: ) as pikerd_portal:
@ -200,7 +202,8 @@ async def maybe_spawn_brokerd(
brokername: str, brokername: str,
loglevel: str | None = None, loglevel: str | None = None,
**kwargs,
**pikerd_kwargs,
) -> tractor.Portal: ) -> tractor.Portal:
''' '''
@ -214,10 +217,10 @@ async def maybe_spawn_brokerd(
service_task_target=spawn_brokerd, service_task_target=spawn_brokerd,
spawn_args={ spawn_args={
'brokername': brokername, 'brokername': brokername,
'loglevel': loglevel,
}, },
loglevel=loglevel, loglevel=loglevel,
**kwargs,
**pikerd_kwargs,
) as portal: ) as portal:
yield portal yield portal
@ -265,16 +268,17 @@ async def maybe_open_emsd(
brokername: str, brokername: str,
loglevel: str | None = None, loglevel: str | None = None,
**kwargs,
**pikerd_kwargs,
) -> tractor.Portal: # noqa ) -> tractor.Portal: # noqa
async with maybe_spawn_daemon( async with maybe_spawn_daemon(
'emsd', 'emsd',
service_task_target=spawn_emsd, service_task_target=spawn_emsd,
spawn_args={'loglevel': loglevel}, spawn_args={},
loglevel=loglevel, loglevel=loglevel,
**kwargs, **pikerd_kwargs,
) as portal: ) as portal:
yield portal yield portal