about summary refs log tree commit diff
path: root/app/workers/hub_ping_worker.rb
blob: 14a151ba0980071107a29777b03f68458747d815 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
# frozen_string_literal: true

class HubPingWorker
  include Sidekiq::Worker
  include RoutingHelper

  def perform(account_id)
    account = Account.find(account_id)
    return unless account.local?
    OStatus2::Publication.new(account_url(account, format: 'atom'), [Rails.configuration.x.hub_url]).publish
  end
end