[render skip] log median score

This commit is contained in:
Andre Medeiros 2022-12-16 13:38:42 -05:00
parent b78a2df159
commit 4ec7338090

View file

@ -196,14 +196,6 @@ func (tc *trendingConsumer) Consume(delivery rmq.Delivery) {
zap.Int("count", tps.Count),
)
if tps.Count == 0 {
tc.logger.Debug("no top posts, bailing early",
zap.Int64("subreddit#id", id),
zap.String("subreddit#name", subreddit.NormalizedName()),
)
return
}
if tps.Count < 20 {
tc.logger.Debug("no top posts, bailing early",
zap.Int64("subreddit#id", id),
@ -307,6 +299,7 @@ func (tc *trendingConsumer) Consume(delivery rmq.Delivery) {
zap.String("subreddit#name", subreddit.NormalizedName()),
zap.String("post#id", post.ID),
zap.String("apns", watcher.Device.APNSToken),
zap.Int64("median_score", medianScore),
)
} else if !res.Sent() {
_ = tc.statsd.Incr("apns.notification.errors", []string{}, 1)
@ -315,6 +308,7 @@ func (tc *trendingConsumer) Consume(delivery rmq.Delivery) {
zap.String("subreddit#name", subreddit.NormalizedName()),
zap.String("post#id", post.ID),
zap.String("apns", watcher.Device.APNSToken),
zap.Int64("median_score", medianScore),
zap.Int("response#status", res.StatusCode),
zap.String("response#reason", res.Reason),
)
@ -326,6 +320,7 @@ func (tc *trendingConsumer) Consume(delivery rmq.Delivery) {
zap.String("post#id", post.ID),
zap.Int64("post#score", post.Score),
zap.String("device#token", watcher.Device.APNSToken),
zap.Int64("median_score", medianScore),
)
}
}