Add link to github project to footer, move FanOutOnWriteService calls to

DistributionWorker. That isn't the heaviest service, yet, but gotta start
somewhere
This commit is contained in:
Eugen Rochko 2016-03-25 03:22:26 +01:00
parent 42dcb0d4cb
commit 8eeec389c1
5 changed files with 29 additions and 7 deletions

View file

@ -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