diff --git a/AsyncLoop.py b/AsyncLoop.py index dfb46b1075a499ce540411d546c4e503d6680719..b9e2e495cc1ea6234c1af7b36f52dc6464f44d01 100644 --- a/AsyncLoop.py +++ b/AsyncLoop.py @@ -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) diff --git a/Service.py b/Service.py index 3238ac2d970a3cf778581b49fe1ede9ebc8023a7..724b513112131037a76d55338d381eb844073c19 100644 --- a/Service.py +++ b/Service.py @@ -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") diff --git a/requirements.txt b/requirements.txt index 1e6d8350552107f30681df0d49f7c8d8792ac9d9..1bdf122de24e5730db3aa7e4f05000299c0fa134 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ events==0.5 paho_mqtt==1.6.1 +asyncio \ No newline at end of file