mastodon/app/workers/sync_remote_account_worker.rb

13 lines
302 B
Ruby

# 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