mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-21 19:37:41 +00:00
update dequeue metric
This commit is contained in:
parent
8dd6242bff
commit
74a87fce34
2 changed files with 13 additions and 11 deletions
|
@ -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)
|
||||||
}()
|
}()
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue