mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-13 07:27:43 +00:00
fix median calculation by forcing a limit
This commit is contained in:
parent
f0353399e8
commit
80438dc1e2
1 changed files with 1 additions and 1 deletions
|
@ -174,7 +174,7 @@ func (tc *trendingConsumer) Consume(delivery rmq.Delivery) {
|
|||
watcher := watchers[i]
|
||||
rac := tc.reddit.NewAuthenticatedClient(watcher.Account.AccountID, watcher.Account.RefreshToken, watcher.Account.AccessToken)
|
||||
|
||||
tps, err := rac.SubredditTop(tc, subreddit.Name, reddit.WithQuery("t", "week"), reddit.WithQuery("show", "all"))
|
||||
tps, err := rac.SubredditTop(tc, subreddit.Name, reddit.WithQuery("t", "week"), reddit.WithQuery("show", "all"), reddit.WithQuery("limit", "25"))
|
||||
if err != nil {
|
||||
tc.logger.Error("failed to fetch weeks's top posts",
|
||||
zap.Error(err),
|
||||
|
|
Loading…
Reference in a new issue