diff --git a/internal/worker/trending.go b/internal/worker/trending.go index 19e3c15..72c515f 100644 --- a/internal/worker/trending.go +++ b/internal/worker/trending.go @@ -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), ) } }