diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-12-16 16:19:28 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2021-12-16 16:20:44 +0100 |
commit | b2526316f54839968c821295e63066beaa425159 (patch) | |
tree | b13a52c19923edfb80518f82ac060f296e68aeb2 /app/workers/scheduler | |
parent | d911c17f521d6b13861caa886715a50b644007a1 (diff) | |
parent | 2aafa5b4e7a83ce8195cd739f1233a52ab060db7 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `app/views/admin/pending_accounts/index.html.haml`: Removed upstream, while it had glitch-soc-specific changes to accomodate for glitch-soc's theming system. Removed the file. Additional changes: - `app/views/admin/accounts/index.html.haml': Accomodate for glitch-soc's theming system.
Diffstat (limited to 'app/workers/scheduler')
-rw-r--r-- | app/workers/scheduler/follow_recommendations_scheduler.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/workers/scheduler/follow_recommendations_scheduler.rb b/app/workers/scheduler/follow_recommendations_scheduler.rb index cb1e15961..effc63e59 100644 --- a/app/workers/scheduler/follow_recommendations_scheduler.rb +++ b/app/workers/scheduler/follow_recommendations_scheduler.rb @@ -16,12 +16,12 @@ class Scheduler::FollowRecommendationsScheduler AccountSummary.refresh FollowRecommendation.refresh - fallback_recommendations = FollowRecommendation.limit(SET_SIZE).index_by(&:account_id) + fallback_recommendations = FollowRecommendation.order(rank: :desc).limit(SET_SIZE).index_by(&:account_id) I18n.available_locales.each do |locale| recommendations = begin if AccountSummary.safe.filtered.localized(locale).exists? # We can skip the work if no accounts with that language exist - FollowRecommendation.localized(locale).limit(SET_SIZE).index_by(&:account_id) + FollowRecommendation.localized(locale).order(rank: :desc).limit(SET_SIZE).index_by(&:account_id) else {} end |