Skip to content
Snippets Groups Projects
Commit 7944ed6f authored by Eugen Rochko's avatar Eugen Rochko
Browse files

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

during Fan Out On Write to load less stuff into memory
parent 627a85f4
No related branches found
No related tags found
No related merge requests found
...@@ -24,8 +24,8 @@ class FanOutOnWriteService < BaseService ...@@ -24,8 +24,8 @@ 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.find_each do |follower| status.account.followers.where(domain: nil).find_each do |follower|
next if !follower.local? || FeedManager.instance.filter?(:home, status, follower) next if FeedManager.instance.filter?(:home, status, follower)
FeedManager.instance.push(:home, follower, status) FeedManager.instance.push(:home, follower, status)
end end
end end
......
...@@ -13,6 +13,7 @@ Rails.application.configure do ...@@ -13,6 +13,7 @@ Rails.application.configure do
# Full error reports are disabled and caching is turned on. # Full error reports are disabled and caching is turned on.
config.consider_all_requests_local = false config.consider_all_requests_local = false
config.action_controller.perform_caching = true config.action_controller.perform_caching = true
config.action_controller.asset_host = ENV['CDN_HOST']
# Disable serving static files from the `/public` folder by default since # Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this. # Apache or NGINX already handles this.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment