synchronize_featured_tags_collection_worker.rb 375 B

12345678910111213
  1. # frozen_string_literal: true
  2. class ActivityPub::SynchronizeFeaturedTagsCollectionWorker
  3. include Sidekiq::Worker
  4. sidekiq_options queue: 'pull', lock: :until_executed, lock_ttl: 1.day.to_i
  5. def perform(account_id, url)
  6. ActivityPub::FetchFeaturedTagsCollectionService.new.call(Account.find(account_id), url)
  7. rescue ActiveRecord::RecordNotFound
  8. true
  9. end
  10. end