From 458c7211ee454d10ceb82a6b921bac8ad6d17509 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 6 Jul 2022 08:58:52 -0400 Subject: [PATCH] Drop `pydantic` from service mngr --- piker/_daemon.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/piker/_daemon.py b/piker/_daemon.py index 82dc848a..836ce60c 100644 --- a/piker/_daemon.py +++ b/piker/_daemon.py @@ -22,10 +22,10 @@ from typing import Optional, Union, Callable, Any from contextlib import asynccontextmanager as acm from collections import defaultdict -from pydantic import BaseModel +from msgspec import Struct +import tractor import trio from trio_typing import TaskStatus -import tractor from .log import get_logger, get_console_log from .brokers import get_brokermod @@ -47,16 +47,13 @@ _root_modules = [ ] -class Services(BaseModel): +class Services(Struct): actor_n: tractor._supervise.ActorNursery service_n: trio.Nursery debug_mode: bool # tractor sub-actor debug mode flag service_tasks: dict[str, tuple[trio.CancelScope, tractor.Portal]] = {} - class Config: - arbitrary_types_allowed = True - async def start_service_task( self, name: str,