forked from treehouse/mastodon
Silence more scope order warnings (#1604)
parent
b155e6ccf5
commit
323671a653
|
@ -12,7 +12,7 @@ class AfterBlockService < BaseService
|
||||||
home_key = FeedManager.instance.key(:home, account.id)
|
home_key = FeedManager.instance.key(:home, account.id)
|
||||||
|
|
||||||
redis.pipelined do
|
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)
|
redis.zrem(home_key, status.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -34,7 +34,7 @@ class FanOutOnWriteService < BaseService
|
||||||
def deliver_to_followers(status)
|
def deliver_to_followers(status)
|
||||||
Rails.logger.debug "Delivering status #{status.id} to followers"
|
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)
|
FeedInsertWorker.perform_async(status.id, follower.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -12,7 +12,7 @@ class MuteService < BaseService
|
||||||
def clear_home_timeline(account, target_account)
|
def clear_home_timeline(account, target_account)
|
||||||
home_key = FeedManager.instance.key(:home, account.id)
|
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)
|
redis.zrem(home_key, status.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -12,7 +12,7 @@ class SuspendAccountService < BaseService
|
||||||
private
|
private
|
||||||
|
|
||||||
def purge_content
|
def purge_content
|
||||||
@account.statuses.find_each do |status|
|
@account.statuses.reorder(nil).find_each do |status|
|
||||||
RemoveStatusService.new.call(status)
|
RemoveStatusService.new.call(status)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue