feedback
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful

This commit is contained in:
2024-11-24 15:48:18 +01:00
parent da5506f432
commit 12bcbfcca4
3 changed files with 14 additions and 0 deletions

View File

@ -44,6 +44,14 @@ def on_connect(client, userdata, flags, reason_code, properties):
client.subscribe(topic)
topic_mapping[topic] = (box, topic_key)
logger.info(f"[{box.id}] Subscribed to '{topic}' (Key: '{topic_key}')")
# Subscribe feedback topic if one is available
if box.feedback_topic:
topic = box.feedback_topic
topic_key = "feedback"
client.subscribe(topic)
topic_mapping[topic] = (box, topic_key)
logger.info(f"[{box.id}] Subscribed to '{topic}' (Key: '{topic_key}')")
# Subscribe to central topics and create mappings
for central_key, central_topic in config.CENTRAL_TOPICS.items():