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

class SyncRemoteAccountWorker
  include Sidekiq::Worker

  def perform(account_id)
    account = Account.find(account_id)
    ActivityPub::FetchAccountStatusesService.new.call(account)
  rescue ActiveRecord::RecordNotFound, ActiveRecord::RecordInvalid
    true
  end
end