Skip to content
Snippets Groups Projects
Commit ac19ea73 authored by Philipp Hock's avatar Philipp Hock
Browse files

some fixes

parent e97219a4
No related branches found
No related tags found
No related merge requests found
......@@ -73,7 +73,7 @@ class AsyncLoop:
def call_in_main_thread(self, callback: Callable[[],None]):
self._loop.call_soon_threadsafe(callback)
def attach_coroutine(self, coroutine: asyncio.coroutine) -> asyncio.Task:
def attach_coroutine(self, coroutine) -> asyncio.Task:
""" attaches a coroutine to the event loop """
return self._loop.create_task(coroutine)
......
......@@ -86,8 +86,8 @@ class Service:
# Set up MQTT message and error callbacks
self.mqtt_client.on_message += lambda msg: self._msg(msg)
self.mqtt_client.on_error += lambda err: self._on_err(err)
self.mqtt_client.on_connect += lambda: print(f"{self._service_topic} connected")
#self.mqtt_client.on_error += lambda err: self._on_err(err)
#self.mqtt_client.on_connect += lambda: print(f"{self._service_topic} connected")
self.mqtt_client.on_disconnect += lambda: print(f"{self._service_topic} disconnected")
......
events==0.5
paho_mqtt==1.6.1
asyncio
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment