This repository has been archived on 2024-07-31. You can view files and clone it, but cannot push or open issues or pull requests.
2018-03-04 03:19:11 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class ActivityPub::SynchronizeFeaturedCollectionWorker
|
|
|
|
include Sidekiq::Worker
|
|
|
|
|
2020-03-31 15:59:03 -04:00
|
|
|
sidekiq_options queue: 'pull', lock: :until_executed
|
2018-03-04 03:19:11 -05:00
|
|
|
|
2022-10-20 03:15:52 -04: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 03:19:11 -05:00
|
|
|
rescue ActiveRecord::RecordNotFound
|
|
|
|
true
|
|
|
|
end
|
|
|
|
end
|