calculate next check properly

This commit is contained in:
Andre Medeiros 2022-05-23 16:50:51 -04:00
parent bb3b4807ff
commit be926f9118

View file

@ -220,7 +220,7 @@ func (nc *notificationsConsumer) Consume(delivery rmq.Delivery) {
// Only update delay on accounts we can actually check, otherwise it skews
// the numbers too much.
if !newAccount {
latency := now.Sub(previousNextCheck) - domain.NotificationCheckInterval
latency := now.Sub(previousNextCheck)
_ = nc.statsd.Histogram("apollo.queue.delay", float64(latency.Milliseconds()), []string{}, rate)
}