mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-12 23:17:44 +00:00
make measurements more accurate in notifications worker
This commit is contained in:
parent
bf2dff8497
commit
a7f585be95
1 changed files with 1 additions and 1 deletions
|
@ -145,7 +145,7 @@ func (nc *notificationsConsumer) Consume(delivery rmq.Delivery) {
|
|||
key := fmt.Sprintf("locks:accounts:%s", id)
|
||||
|
||||
// Measure queue latency
|
||||
ttl := nc.redis.TTL(nc, key).Val()
|
||||
ttl := nc.redis.PTTL(nc, key).Val()
|
||||
age := (domain.NotificationCheckTimeout - ttl)
|
||||
_ = nc.statsd.Histogram("apollo.dequeue.latency", float64(age.Milliseconds()), []string{"queue:notifications"}, 0.1)
|
||||
|
||||
|
|
Loading…
Reference in a new issue