From 3319473b2c493ea422bd6b68b3d08adb8b5acfac Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 5 Oct 2016 13:50:21 +0200 Subject: Move PubSubHubbub pinging to a background worker It can take as much as 0.5s if not longer to complete --- app/services/reblog_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/services/reblog_service.rb') diff --git a/app/services/reblog_service.rb b/app/services/reblog_service.rb index 56c59cb18..627d4e0e8 100644 --- a/app/services/reblog_service.rb +++ b/app/services/reblog_service.rb @@ -6,7 +6,7 @@ class ReblogService < BaseService def call(account, reblogged_status) reblog = account.statuses.create!(reblog: reblogged_status, text: '') DistributionWorker.perform_async(reblog.id) - account.ping!(account_url(account, format: 'atom'), [Rails.configuration.x.hub_url]) + HubPingWorker.perform_async(account.id) if reblogged_status.local? NotificationMailer.reblog(reblogged_status, account).deliver_later unless reblogged_status.account.blocking?(account) -- cgit