From 717939e90290c56c37c1460203842bcd1c34d961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mose=20M=C3=BCller?= Date: Wed, 2 Aug 2023 12:06:21 +0200 Subject: [PATCH] fixing GenericComponent exports --- frontend/src/components/GenericComponent.tsx | 4 ++-- src/pyDataInterface/server/server.py | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/GenericComponent.tsx b/frontend/src/components/GenericComponent.tsx index 395af63..3f1163e 100644 --- a/frontend/src/components/GenericComponent.tsx +++ b/frontend/src/components/GenericComponent.tsx @@ -9,7 +9,7 @@ import { StringComponent } from './StringComponent'; import { ListComponent } from './ListComponent'; import { DataServiceComponent, DataServiceJSON } from './DataServiceComponent'; -export type AttributeType = +type AttributeType = | 'str' | 'bool' | 'float' @@ -21,7 +21,7 @@ export type AttributeType = | 'NumberSlider'; type ValueType = boolean | string | number | object; -interface Attribute { +export interface Attribute { type: AttributeType; value?: ValueType | ValueType[]; readonly: boolean; diff --git a/src/pyDataInterface/server/server.py b/src/pyDataInterface/server/server.py index 0130a3d..a1778fc 100644 --- a/src/pyDataInterface/server/server.py +++ b/src/pyDataInterface/server/server.py @@ -23,7 +23,7 @@ from .web_server import WebAPI try: import tiqi_rpc except ImportError: - logger.debug("tiqi_rpc is not installed. tiqi_rpc.Server will not be exposed.") + logger.debug("tiqi_rpc is not installed. tiqi_rpc. Server will not be exposed.") tiqi_rpc = None # type: ignore @@ -91,14 +91,11 @@ class Server: logger.info(f"Finished server process [{process_id}]") - def _start_autostart_tasks(self) -> None: - self._service._start_autostart_tasks() - async def startup(self) -> None: # noqa: C901 self._loop = asyncio.get_running_loop() self._loop.set_exception_handler(self.custom_exception_handler) self.install_signal_handlers() - self._start_autostart_tasks() + self._service._start_autostart_tasks() if self._enable_rpc: self.executor = ThreadPoolExecutor()