Init at some place, minimize changes

This commit is contained in:
Till Faelligen 2022-03-28 11:15:14 +02:00
parent 1c3606e4aa
commit 183daf8326

View file

@ -49,6 +49,13 @@ type OutgoingQueues struct {
queues map[gomatrixserverlib.ServerName]*destinationQueue
}
func init() {
prometheus.MustRegister(
destinationQueueTotal, destinationQueueRunning,
destinationQueueBackingOff,
)
}
var destinationQueueTotal = prometheus.NewGauge(
prometheus.GaugeOpts{
Namespace: "dendrite",
@ -73,13 +80,6 @@ var destinationQueueBackingOff = prometheus.NewGauge(
},
)
func init() {
prometheus.MustRegister(
destinationQueueTotal, destinationQueueRunning,
destinationQueueBackingOff,
)
}
// NewOutgoingQueues makes a new OutgoingQueues
func NewOutgoingQueues(
db storage.Database,