Fix panic at startup if roomserver was not given federation API reference by the time NATS consumes an event, tweak backpressure metrics

This commit is contained in:
Neil Alexander 2022-01-07 13:41:53 +00:00
parent 173b1e8d3e
commit a422321435
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 10 additions and 6 deletions

View file

@ -72,9 +72,6 @@ func NewRoomserverAPI(
},
// perform-er structs get initialised when we have a federation sender to use
}
if err := a.Inputer.Start(); err != nil {
logrus.WithError(err).Panic("failed to start roomserver input API")
}
return a
}
@ -140,6 +137,10 @@ func (r *RoomserverInternalAPI) SetFederationAPI(fsAPI fsAPI.FederationInternalA
r.Forgetter = &perform.Forgetter{
DB: r.DB,
}
if err := r.Inputer.Start(); err != nil {
logrus.WithError(err).Panic("failed to start roomserver input API")
}
}
func (r *RoomserverInternalAPI) SetAppserviceAPI(asAPI asAPI.AppServiceQueryAPI) {