Skip to content

Commit

Permalink
Another try
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmittag committed Jul 11, 2024
1 parent dd26dae commit 27d94e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion velocitas_sdk/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
8 changes: 4 additions & 4 deletions velocitas_sdk/vehicle_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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()

Expand All @@ -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)
Expand All @@ -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)

0 comments on commit 27d94e8

Please sign in to comment.