From be926f911839857fe90676922361062cb417fdbe Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Mon, 23 May 2022 16:50:51 -0400 Subject: [PATCH] calculate next check properly --- internal/worker/notifications.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/worker/notifications.go b/internal/worker/notifications.go index ef04bae..8753720 100644 --- a/internal/worker/notifications.go +++ b/internal/worker/notifications.go @@ -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) }