summaryrefslogtreecommitdiffstats
path: root/app/services/favourite_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-05 13:50:21 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-05 13:50:21 +0200
commit3319473b2c493ea422bd6b68b3d08adb8b5acfac (patch)
tree7fa010ab90249ca4a091f3726fa0efedd9e857e1 /app/services/favourite_service.rb
parent2febc6ed65330a00f311b373d508ede1cb8749e5 (diff)
Move PubSubHubbub pinging to a background worker
It can take as much as 0.5s if not longer to complete
Diffstat (limited to 'app/services/favourite_service.rb')
-rw-r--r--app/services/favourite_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/favourite_service.rb b/app/services/favourite_service.rb
index 98f08d32b87..ab7f8aea124 100644
--- a/app/services/favourite_service.rb
+++ b/app/services/favourite_service.rb
@@ -5,7 +5,7 @@ class FavouriteService < BaseService
# @return [Favourite]
def call(account, status)
favourite = Favourite.create!(account: account, status: status)
- account.ping!(account_url(account, format: 'atom'), [Rails.configuration.x.hub_url])
+ HubPingWorker.perform_async(account.id)
if status.local?
NotificationMailer.favourite(status, account).deliver_later unless status.account.blocking?(account)