about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorMatt Jankowski <mjankowski@thoughtbot.com>2017-04-12 09:58:08 -0400
committerEugen <eugen@zeonfederated.com>2017-04-12 15:58:08 +0200
commit323671a653e22704f0d50be13d67bf6fe6ee3a2a (patch)
treec5eb96bcaa91e147b43298235fe146400f1ef667 /app
parentb155e6ccf55bbd0e2b07d6e06349849dd1f06f0a (diff)
Silence more scope order warnings (#1604)
Diffstat (limited to 'app')
-rw-r--r--app/services/after_block_service.rb2
-rw-r--r--app/services/fan_out_on_write_service.rb2
-rw-r--r--app/services/mute_service.rb2
-rw-r--r--app/services/suspend_account_service.rb2
4 files changed, 4 insertions, 4 deletions
diff --git a/app/services/after_block_service.rb b/app/services/after_block_service.rb
index 0f478bcb7..d1a846f21 100644
--- a/app/services/after_block_service.rb
+++ b/app/services/after_block_service.rb
@@ -12,7 +12,7 @@ class AfterBlockService < BaseService
     home_key = FeedManager.instance.key(:home, account.id)
 
     redis.pipelined do
-      target_account.statuses.select('id').find_each do |status|
+      target_account.statuses.select('id').reorder(nil).find_each do |status|
         redis.zrem(home_key, status.id)
       end
     end
diff --git a/app/services/fan_out_on_write_service.rb b/app/services/fan_out_on_write_service.rb
index 19eedc0a7..055fda8a9 100644
--- a/app/services/fan_out_on_write_service.rb
+++ b/app/services/fan_out_on_write_service.rb
@@ -34,7 +34,7 @@ class FanOutOnWriteService < BaseService
   def deliver_to_followers(status)
     Rails.logger.debug "Delivering status #{status.id} to followers"
 
-    status.account.followers.where(domain: nil).joins(:user).where('users.current_sign_in_at > ?', 14.days.ago).select(:id).find_each do |follower|
+    status.account.followers.where(domain: nil).joins(:user).where('users.current_sign_in_at > ?', 14.days.ago).select(:id).reorder(nil).find_each do |follower|
       FeedInsertWorker.perform_async(status.id, follower.id)
     end
   end
diff --git a/app/services/mute_service.rb b/app/services/mute_service.rb
index 0050cfc8d..1a650ed2a 100644
--- a/app/services/mute_service.rb
+++ b/app/services/mute_service.rb
@@ -12,7 +12,7 @@ class MuteService < BaseService
   def clear_home_timeline(account, target_account)
     home_key = FeedManager.instance.key(:home, account.id)
 
-    target_account.statuses.select('id').find_each do |status|
+    target_account.statuses.select('id').reorder(nil).find_each do |status|
       redis.zrem(home_key, status.id)
     end
   end
diff --git a/app/services/suspend_account_service.rb b/app/services/suspend_account_service.rb
index 8528ef62a..42ff4dcb7 100644
--- a/app/services/suspend_account_service.rb
+++ b/app/services/suspend_account_service.rb
@@ -12,7 +12,7 @@ class SuspendAccountService < BaseService
   private
 
   def purge_content
-    @account.statuses.find_each do |status|
+    @account.statuses.reorder(nil).find_each do |status|
       RemoveStatusService.new.call(status)
     end