Adding option to specify asset server, filter followers query by local accounts

during Fan Out On Write to load less stuff into memory
This commit is contained in:
Eugen Rochko 2016-11-21 22:04:10 +01:00
parent 627a85f4e4
commit 7944ed6fe5
2 changed files with 3 additions and 2 deletions

View file

@ -24,8 +24,8 @@ class FanOutOnWriteService < BaseService
def deliver_to_followers(status)
Rails.logger.debug "Delivering status #{status.id} to followers"
status.account.followers.find_each do |follower|
next if !follower.local? || FeedManager.instance.filter?(:home, status, follower)
status.account.followers.where(domain: nil).find_each do |follower|
next if FeedManager.instance.filter?(:home, status, follower)
FeedManager.instance.push(:home, follower, status)
end
end