mirror of
https://github.com/christianselig/apollo-backend
synced 2024-12-22 14:25:28 +00:00
[render skip] log median score
This commit is contained in:
parent
b78a2df159
commit
4ec7338090
1 changed files with 3 additions and 8 deletions
|
@ -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),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue