From 2d609dceac13d77c7359a5906675622ea7534b28 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 4 Apr 2023 13:45:52 -0400 Subject: [PATCH] Drop `loglevel` from `spawn_args` inputs to `maybe_spawn_daemon()` --- piker/data/_sampling.py | 6 +++--- piker/service/_daemon.py | 24 ++++++++++++++---------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/piker/data/_sampling.py b/piker/data/_sampling.py index 84dce08e..3ebdd140 100644 --- a/piker/data/_sampling.py +++ b/piker/data/_sampling.py @@ -429,7 +429,7 @@ async def spawn_samplerd( async def maybe_open_samplerd( loglevel: str | None = None, - **kwargs, + **pikerd_kwargs, ) -> tractor.Portal: # noqa ''' @@ -442,9 +442,9 @@ async def maybe_open_samplerd( async with maybe_spawn_daemon( dname, service_task_target=spawn_samplerd, - spawn_args={'loglevel': loglevel}, + spawn_args={}, loglevel=loglevel, - **kwargs, + **pikerd_kwargs, ) as portal: yield portal diff --git a/piker/service/_daemon.py b/piker/service/_daemon.py index 0521f830..ba1a467a 100644 --- a/piker/service/_daemon.py +++ b/piker/service/_daemon.py @@ -57,11 +57,13 @@ async def maybe_spawn_daemon( service_name: str, 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, - **kwargs, + + **pikerd_kwargs, ) -> tractor.Portal: ''' @@ -97,7 +99,7 @@ async def maybe_spawn_daemon( # process tree async with maybe_open_pikerd( loglevel=loglevel, - **kwargs, + **pikerd_kwargs, ) as pikerd_portal: @@ -200,7 +202,8 @@ async def maybe_spawn_brokerd( brokername: str, loglevel: str | None = None, - **kwargs, + + **pikerd_kwargs, ) -> tractor.Portal: ''' @@ -214,10 +217,10 @@ async def maybe_spawn_brokerd( service_task_target=spawn_brokerd, spawn_args={ 'brokername': brokername, - 'loglevel': loglevel, }, loglevel=loglevel, - **kwargs, + + **pikerd_kwargs, ) as portal: yield portal @@ -265,16 +268,17 @@ async def maybe_open_emsd( brokername: str, loglevel: str | None = None, - **kwargs, + + **pikerd_kwargs, ) -> tractor.Portal: # noqa async with maybe_spawn_daemon( 'emsd', service_task_target=spawn_emsd, - spawn_args={'loglevel': loglevel}, + spawn_args={}, loglevel=loglevel, - **kwargs, + **pikerd_kwargs, ) as portal: yield portal