update dequeue metric

This commit is contained in:
Andre Medeiros 2023-03-16 10:34:15 -04:00
parent 8dd6242bff
commit 74a87fce34
2 changed files with 13 additions and 11 deletions

View file

@ -534,15 +534,17 @@ func enqueueAccounts(ctx context.Context, logger *zap.Logger, statsd *statsd.Cli
} }
wg.Wait() wg.Wait()
var ( /*
enqueued int64 = 0 var (
skipped int64 = 0 enqueued int64 = 0
) skipped int64 = 0
)
defer func() { defer func() {
tags := []string{"queue:notifications"} tags := []string{"queue:notifications"}
_ = statsd.Histogram("apollo.queue.enqueued", float64(enqueued), tags, 1) _ = statsd.Histogram("apollo.queue.enqueued", float64(enqueued), tags, 1)
_ = statsd.Histogram("apollo.queue.skipped", float64(skipped), tags, 1) _ = statsd.Histogram("apollo.queue.skipped", float64(skipped), tags, 1)
_ = statsd.Histogram("apollo.queue.runtime", float64(time.Since(now).Milliseconds()), tags, 1) _ = statsd.Histogram("apollo.queue.runtime", float64(time.Since(now).Milliseconds()), tags, 1)
}() }()
*/
} }

View file

@ -9,7 +9,7 @@ import (
) )
const ( const (
NotificationCheckInterval = 10 * time.Second // time between notification checks NotificationCheckInterval = 60 * time.Second // time between notification checks
NotificationCheckTimeout = 5 * time.Minute // time before we give up an account check lock NotificationCheckTimeout = 5 * time.Minute // time before we give up an account check lock
StuckNotificationCheckInterval = 2 * time.Minute // time between stuck notification checks StuckNotificationCheckInterval = 2 * time.Minute // time between stuck notification checks
StaleTokenThreshold = 2 * time.Hour // time an oauth token has to be expired for to be stale StaleTokenThreshold = 2 * time.Hour // time an oauth token has to be expired for to be stale