2018-03-04 17:19:11 +09:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class ActivityPub::SynchronizeFeaturedCollectionWorker
|
|
|
|
include Sidekiq::Worker
|
|
|
|
|
2020-04-01 04:59:03 +09:00
|
|
|
sidekiq_options queue: 'pull', lock: :until_executed
|
2018-03-04 17:19:11 +09:00
|
|
|
|
2022-10-20 16:15:52 +09:00
|
|
|
def perform(account_id, options = {})
|
|
|
|
options = { note: true, hashtag: false }.deep_merge(options.deep_symbolize_keys)
|
|
|
|
|
|
|
|
ActivityPub::FetchFeaturedCollectionService.new.call(Account.find(account_id), **options)
|
2018-03-04 17:19:11 +09:00
|
|
|
rescue ActiveRecord::RecordNotFound
|
|
|
|
true
|
|
|
|
end
|
|
|
|
end
|