Manager: don't forward task log updates to MQTT

Task log updates are big and frequent, and should not be sent via MQTT.
At least not until we have a practical reason to do so.
This commit is contained in:
Sybren A. Stüvel 2024-03-07 15:22:44 +01:00
parent 358efe7ae0
commit cbafacdff6

@ -13,6 +13,8 @@ import (
"github.com/eclipse/paho.golang/paho"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"projects.blender.org/studio/flamenco/pkg/api"
)
const (
@ -150,6 +152,11 @@ func (m *MQTTForwarder) queueRunner(queueRunnerCtx context.Context) {
}
func (m *MQTTForwarder) Broadcast(topic EventTopic, payload interface{}) {
if _, ok := payload.(api.EventTaskLogUpdate); ok {
// Task log updates aren't sent through MQTT, as that can generate a lot of traffic.
return
}
fullTopic := m.topicPrefix + string(topic)
asJSON, err := json.Marshal(payload)