about summary refs log tree commit diff
path: root/app/workers/hub_ping_worker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/hub_ping_worker.rb')
-rw-r--r--app/workers/hub_ping_worker.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/workers/hub_ping_worker.rb b/app/workers/hub_ping_worker.rb
new file mode 100644
index 000000000..57d716c97
--- /dev/null
+++ b/app/workers/hub_ping_worker.rb
@@ -0,0 +1,9 @@
+class HubPingWorker
+  include Sidekiq::Worker
+  include RoutingHelper
+
+  def perform(account_id)
+    account = Account.find(account_id)
+    account.ping!(account_url(account, format: 'atom'), [Rails.configuration.x.hub_url])
+  end
+end