]> cat aescling's git repositories - mastodon.git/commitdiff
Adding option to specify asset server, filter followers query by local accounts
authorEugen Rochko <eugen@zeonfederated.com>
Mon, 21 Nov 2016 21:04:10 +0000 (22:04 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 21 Nov 2016 21:04:10 +0000 (22:04 +0100)
during Fan Out On Write to load less stuff into memory

app/services/fan_out_on_write_service.rb
config/environments/production.rb

index 70cf06e02b29c9a74abad785fb39dc92a2fc4c1b..78cb0b13f8cebf0db4b57de3be8002a8505b0f13 100644 (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
index 27238e3d8816dd68776325bb0dd73504c39807b6..7f13fcf6b3299e6a5b55c2aefb1f3fbb5616d886 100644 (file)
@@ -13,6 +13,7 @@ Rails.application.configure do
   # Full error reports are disabled and caching is turned on.
   config.consider_all_requests_local       = false
   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
   # Apache or NGINX already handles this.