Expect `loglevel: str` in brokerd root task ep

Set the level right after spawn and once for the lifetime of the daemon.
rekt_pps
Tyler Goodlet 2023-04-04 13:25:36 -04:00
parent eb7a7462ad
commit 4c1d174801
1 changed files with 4 additions and 3 deletions

View File

@ -56,6 +56,7 @@ __all__ = [
async def _setup_persistent_brokerd( async def _setup_persistent_brokerd(
ctx: tractor.Context, ctx: tractor.Context,
brokername: str, brokername: str,
loglevel: str | None = None,
) -> None: ) -> None:
''' '''
@ -64,7 +65,9 @@ async def _setup_persistent_brokerd(
the broker backend as needed. the broker backend as needed.
''' '''
get_console_log(tractor.current_actor().loglevel) get_console_log(
loglevel or tractor.current_actor().loglevel,
)
from .feed import ( from .feed import (
_bus, _bus,
@ -84,5 +87,3 @@ async def _setup_persistent_brokerd(
# we pin this task to keep the feeds manager active until the # we pin this task to keep the feeds manager active until the
# parent actor decides to tear it down # parent actor decides to tear it down
await trio.sleep_forever() await trio.sleep_forever()