diff options
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/post_status_service.rb | 6 | ||||
-rw-r--r-- | app/services/process_feed_service.rb | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index e8335639c..69e39c1a6 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -7,7 +7,7 @@ class PostStatusService < BaseService def call(account, text, in_reply_to = nil) status = account.statuses.create!(text: text, thread: in_reply_to) process_mentions_service.(status) - fan_out_on_write_service.(status) + DistributionWorker.perform_async(status.id) account.ping!(account_url(account, format: 'atom'), [Rails.configuration.x.hub_url]) status end @@ -17,8 +17,4 @@ class PostStatusService < BaseService def process_mentions_service @process_mentions_service ||= ProcessMentionsService.new end - - def fan_out_on_write_service - @fan_out_on_write_service ||= FanOutOnWriteService.new - end end diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb index e842031f5..047d0e747 100644 --- a/app/services/process_feed_service.rb +++ b/app/services/process_feed_service.rb @@ -38,7 +38,7 @@ class ProcessFeedService < BaseService # If we added a status, go through accounts it mentions and create respective relations unless status.new_record? record_remote_mentions(status, entry.xpath('./xmlns:link[@rel="mentioned"]')) - fan_out_on_write_service.(status) + DistributionWorker.perform_async(status.id) end end |