MQTT and nodes update
This commit is contained in:
@@ -62,7 +62,8 @@ async def send_command(node_id: str, cmd: CommandPayload):
|
||||
elif cmd.action == "discord_leave":
|
||||
await release_token(node_id)
|
||||
|
||||
mqtt_handler.send_command(node_id, payload)
|
||||
if not mqtt_handler.send_command(node_id, payload):
|
||||
raise HTTPException(503, "MQTT broker unavailable — command not delivered.")
|
||||
return {"ok": True}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user