From 31392af427204949437846b8289230cce5183afa Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 9 Mar 2023 12:22:33 -0500 Subject: [PATCH] Move enabled module defs to just above where used --- piker/service/_actor_runtime.py | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/piker/service/_actor_runtime.py b/piker/service/_actor_runtime.py index e07f342e..134b085c 100644 --- a/piker/service/_actor_runtime.py +++ b/piker/service/_actor_runtime.py @@ -49,8 +49,6 @@ from ._registry import ( # noqa log = get_logger(__name__) -_root_dname = 'pikerd' - def get_tractor_runtime_kwargs() -> dict[str, Any]: ''' @@ -60,15 +58,6 @@ def get_tractor_runtime_kwargs() -> dict[str, Any]: return _tractor_kwargs -_root_modules = [ - __name__, - 'piker.service._daemon', - 'piker.clearing._ems', - 'piker.clearing._client', - 'piker.data._sampling', -] - - @acm async def open_piker_runtime( name: str, @@ -139,6 +128,16 @@ async def open_piker_runtime( ) +_root_dname = 'pikerd' +_root_modules = [ + __name__, + 'piker.service._daemon', + 'piker.clearing._ems', + 'piker.clearing._client', + 'piker.data._sampling', +] + + @acm async def open_pikerd( @@ -155,8 +154,7 @@ async def open_pikerd( ) -> Services: ''' - Start a root piker daemon who's lifetime extends indefinitely until - cancelled. + Start a root piker daemon with an indefinite lifetime. A root actor nursery is created which can be used to create and keep alive underling services (see below).