* Add a limit to how many posts can get fetched as a result of a single request * Add tests * Always pass `request_id` when processing `Announce` activities --------- Co-authored-by: nametoolong <nametoolong@users.noreply.github.com>
14 lines
405 B
Ruby
14 lines
405 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ActivityPub::FetchRepliesWorker
|
|
include Sidekiq::Worker
|
|
include ExponentialBackoff
|
|
|
|
sidekiq_options queue: 'pull', retry: 3
|
|
|
|
def perform(parent_status_id, replies_uri, options = {})
|
|
ActivityPub::FetchRepliesService.new.call(Status.find(parent_status_id), replies_uri, **options.deep_symbolize_keys)
|
|
rescue ActiveRecord::RecordNotFound
|
|
true
|
|
end
|
|
end
|