|
|
|
@ -37,7 +37,7 @@ class FanOutOnWriteService < BaseService
|
|
|
|
|
def deliver_to_followers(status)
|
|
|
|
|
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).reorder(nil).find_in_batches do |followers|
|
|
|
|
|
status.account.followers.where(domain: nil).joins(:user).where('users.current_sign_in_at > ?', User::ACTIVE_DURATION.ago).select(:id).reorder(nil).find_in_batches do |followers|
|
|
|
|
|
FeedInsertWorker.push_bulk(followers) do |follower|
|
|
|
|
|
[status.id, follower.id, :home]
|
|
|
|
|
end
|
|
|
|
@ -47,7 +47,7 @@ class FanOutOnWriteService < BaseService
|
|
|
|
|
def deliver_to_lists(status)
|
|
|
|
|
Rails.logger.debug "Delivering status #{status.id} to lists"
|
|
|
|
|
|
|
|
|
|
status.account.lists.joins(account: :user).where('users.current_sign_in_at > ?', 14.days.ago).select(:id).reorder(nil).find_in_batches do |lists|
|
|
|
|
|
status.account.lists.joins(account: :user).where('users.current_sign_in_at > ?', User::ACTIVE_DURATION.ago).select(:id).reorder(nil).find_in_batches do |lists|
|
|
|
|
|
FeedInsertWorker.push_bulk(lists) do |list|
|
|
|
|
|
[status.id, list.id, :list]
|
|
|
|
|
end
|
|
|
|
|