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

class ActivityPub::SynchronizeFeaturedCollectionWorker
  include Sidekiq::Worker

  sidekiq_options queue: 'pull', lock: :until_executed

  def perform(account_id)
    ActivityPub::FetchFeaturedCollectionService.new.call(Account.find(account_id))
  rescue ActiveRecord::RecordNotFound
    true
  end
end