mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-25 05:07:43 +00:00
latency is a positive value
This commit is contained in:
parent
5095b78681
commit
c346b728fc
1 changed files with 1 additions and 1 deletions
|
@ -103,7 +103,7 @@ func accountWorker(id int, rc *reddit.Client, db *sql.DB, logger *log.Logger, st
|
|||
// Set latest message we alerted on
|
||||
latestMsg := msgs.MessageListing.Messages[0]
|
||||
|
||||
latency := latestMsg.CreatedAt - float64(now)
|
||||
latency := float64(now) - latestMsg.CreatedAt
|
||||
statsd.Histogram("apollo.notification.latency", latency, []string{}, rate)
|
||||
|
||||
_, err = tx.Exec(`UPDATE accounts SET last_message_id = $1 WHERE id = $2`, latestMsg.FullName(), account.ID)
|
||||
|
|
Loading…
Reference in a new issue