mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-25 13:17:42 +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]
|
watcher := watchers[i]
|
||||||
rac := tc.reddit.NewAuthenticatedClient(watcher.Account.AccountID, watcher.Account.RefreshToken, watcher.Account.AccessToken)
|
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 {
|
if err != nil {
|
||||||
tc.logger.Error("failed to fetch weeks's top posts",
|
tc.logger.Error("failed to fetch weeks's top posts",
|
||||||
zap.Error(err),
|
zap.Error(err),
|
||||||
|
|
Loading…
Reference in a new issue