Update the poller metrics after the poller was started

This commit is contained in:
Till Faelligen 2023-09-22 09:41:48 +02:00
parent 6fe9b18f8c
commit 0c149ba78d
No known key found for this signature in database
GPG Key ID: ACCDC9606D472758

View File

@ -160,6 +160,7 @@ func (h *Handler) StartV2Pollers() {
if err != nil {
logger.Err(err).Str("user_id", t.UserID).Str("device_id", t.DeviceID).Msg("Failed to start poller")
}
h.updateMetrics()
h.v2Pub.Notify(pubsub.ChanV2, &pubsub.V2InitialSyncComplete{
UserID: t.UserID,
DeviceID: t.DeviceID,
@ -170,7 +171,6 @@ func (h *Handler) StartV2Pollers() {
}
wg.Wait()
logger.Info().Msg("StartV2Pollers finished")
h.updateMetrics()
h.startPollerExpiryTicker()
}