diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-12-16 19:45:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-16 19:45:17 +0100 |
commit | 7efef7db9ed6f7b25a28166c1b75a28adbaf7cdb (patch) | |
tree | ad8ebb28e0466649785afa167e8711debb271e68 /app/workers/scheduler | |
parent | d911c17f521d6b13861caa886715a50b644007a1 (diff) | |
parent | 50d62fe2e749a5ab2b2bed81d5a9449b5e733964 (diff) |
Merge pull request #1648 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
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 |