INNER CODE UNIT · Python
disconnect_handler
sabuhish/fastapi-mqtt · fastapi_mqtt/fastmqtt.py:320
def disconnect_handler(handler: MQTTDisconnectHandler) -> MQTTDisconnectHandler:
self._logger.debug("on_disconnect handler accepted")
return self.mqtt_handlers.on_disconnect(handler)
return disconnect_handler
def on_subscribe(self) -> Callable[..., Any]:
"""
Decorator method is used to obtain subscribed topics and properties.
"""
def subscribe_handler(handler: MQTTSubscriptionHandler) -> MQTTSubscriptionHandler:
self._logger.debug("on_subscribe handler accepted")
return self.mqtt_handlers.on_subscribe(handler)
return subscribe_handler