From 27d94e8abfeb53c9756a32f17326afdca9449537 Mon Sep 17 00:00:00 2001 From: lukasmittag Date: Thu, 11 Jul 2024 09:14:35 +0200 Subject: [PATCH] Another try --- velocitas_sdk/base.py | 2 +- velocitas_sdk/vehicle_app.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/velocitas_sdk/base.py b/velocitas_sdk/base.py index 435a4e99..e6a488f9 100644 --- a/velocitas_sdk/base.py +++ b/velocitas_sdk/base.py @@ -62,7 +62,7 @@ class Middleware(ABC): def __init__(self) -> None: self.type = MiddlewareType.NATIVE self.service_locator: ServiceLocator - self.pubsub_client: PubSubClient + # self.pubsub_client: PubSubClient @abstractmethod async def start(self): diff --git a/velocitas_sdk/vehicle_app.py b/velocitas_sdk/vehicle_app.py index e890ef75..a3e20a7a 100644 --- a/velocitas_sdk/vehicle_app.py +++ b/velocitas_sdk/vehicle_app.py @@ -68,7 +68,7 @@ class VehicleApp: def __init__(self): self.middleware = config.middleware self._vdb_client = VehicleDataBrokerClient() - self.pubsub_client = self.middleware.pubsub_client + # self.pubsub_client = self.middleware.pubsub_client logger.debug("VehicleApp instantiation successfully done") async def on_start(self): @@ -93,7 +93,7 @@ async def run(self): callback = method[1] topic = method[1].subscribeTopic - await self.pubsub_client.subscribe_topic(topic, callback) + # await self.pubsub_client.subscribe_topic(topic, callback) await config.middleware.wait_until_ready() @@ -108,7 +108,7 @@ async def run(self): except Exception as ex: logger.exception(ex) try: - asyncio.create_task(self.pubsub_client.run()) + #asyncio.create_task(self.pubsub_client.run()) await self.on_start() while True: await asyncio.sleep(1) @@ -125,4 +125,4 @@ async def publish_mqtt_event(self, topic: str, data: str): await self.publish_event(topic, data) async def publish_event(self, topic: str, data: str): - await self.pubsub_client.publish_event(topic, data) + #await self.pubsub_client.publish_event(topic, data)