def publish(self, payload):
if payload is None:
return
if self.config["publish_changes_only"] is False or payload != self.last_payload:
try:
self.gateway.publish(self.topic, json.dumps(payload))
except Exception as e:
import sys
sys.print_exception(e)
self.last_payload = payload
评论列表
文章目录