mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-06 02:01:37 -07:00
@@ -590,11 +590,11 @@ def publish_notifications(db, mqtt_client):
|
|||||||
|
|
||||||
# Publish to a single MQTT topic safely
|
# Publish to a single MQTT topic safely
|
||||||
topic = f"{topic_root}/notifications/all"
|
topic = f"{topic_root}/notifications/all"
|
||||||
mylog('debug', [f"[{pluginName}] Publishing notification GUID {notification["GUID"]} to MQTT topic {topic}"])
|
mylog('debug', [f"[{pluginName}] Publishing notification GUID {notification['GUID']} to MQTT topic {topic}"])
|
||||||
try:
|
try:
|
||||||
publish_mqtt(mqtt_client, topic, payload)
|
publish_mqtt(mqtt_client, topic, payload)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
mylog('minimal', [f"[{pluginName}] ⚠ ERROR publishing MQTT notification GUID {notification["GUID"]}: {e}"])
|
mylog('minimal', [f"[{pluginName}] ⚠ ERROR publishing MQTT notification GUID {notification['GUID']}: {e}"])
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user