mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-06 14:33:10 -06:00
Don't log the same error twice, undo unrelated change
This commit is contained in:
parent
d216eea879
commit
099233770b
|
|
@ -119,7 +119,7 @@ func (s *OutputRoomEventConsumer) onMessage(
|
||||||
for _, msg := range msgs {
|
for _, msg := range msgs {
|
||||||
// Only handle events we care about
|
// Only handle events we care about
|
||||||
receivedType := api.OutputType(msg.Header.Get(jetstream.RoomEventType))
|
receivedType := api.OutputType(msg.Header.Get(jetstream.RoomEventType))
|
||||||
if receivedType != api.OutputTypeNewRoomEvent {
|
if receivedType != api.OutputTypeNewRoomEvent && receivedType != api.OutputTypeNewInviteEvent {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// Parse out the event JSON
|
// Parse out the event JSON
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ package producers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nats-io/nats.go"
|
"github.com/nats-io/nats.go"
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// AppserviceEventProducer produces events for the appservice API to consume
|
// AppserviceEventProducer produces events for the appservice API to consume
|
||||||
|
|
@ -29,9 +28,6 @@ func (a *AppserviceEventProducer) ProduceRoomEvents(
|
||||||
msg *nats.Msg,
|
msg *nats.Msg,
|
||||||
) error {
|
) error {
|
||||||
msg.Subject = a.Topic
|
msg.Subject = a.Topic
|
||||||
if _, err := a.JetStream.PublishMsg(msg); err != nil {
|
_, err := a.JetStream.PublishMsg(msg)
|
||||||
logrus.WithError(err).Errorf("Failed to produce to topic '%s': %s", a.Topic, err)
|
|
||||||
return err
|
return err
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue