diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-08-21 12:25:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-21 12:25:50 +0200 |
commit | d98de8ada743886c3cd48b2ad942d46b805af7a9 (patch) | |
tree | 9c7551f7b60a7884929e259e85d91f14c6602395 /app/services/block_domain_service.rb | |
parent | 83746b63646088396232a348f4024b101f39c78a (diff) |
Get rid of all batch order warnings (#8334)
Diffstat (limited to 'app/services/block_domain_service.rb')
-rw-r--r-- | app/services/block_domain_service.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/services/block_domain_service.rb b/app/services/block_domain_service.rb index d082de40b..a1fe93665 100644 --- a/app/services/block_domain_service.rb +++ b/app/services/block_domain_service.rb @@ -43,14 +43,14 @@ class BlockDomainService < BaseService end def suspend_accounts! - blocked_domain_accounts.where(suspended: false).find_each do |account| + blocked_domain_accounts.where(suspended: false).reorder(nil).find_each do |account| UnsubscribeService.new.call(account) if account.subscribed? SuspendAccountService.new.call(account) end end def clear_account_images! - blocked_domain_accounts.find_each do |account| + blocked_domain_accounts.reorder(nil).find_each do |account| account.avatar.destroy if account.avatar.exists? account.header.destroy if account.header.exists? account.save @@ -58,7 +58,7 @@ class BlockDomainService < BaseService end def clear_account_attachments! - media_from_blocked_domain.find_each do |attachment| + media_from_blocked_domain.reorder(nil).find_each do |attachment| @affected_status_ids << attachment.status_id if attachment.status_id.present? attachment.file.destroy if attachment.file.exists? |