mastodon/app/workers/fetch_reply_worker.rb
Eugen Rochko b0b858d2da
Some checks are pending
Chromatic / Run Chromatic (push) Waiting to run
Add button to load new replies in web UI
2025-07-16 07:53:14 +02:00

16 lines
392 B
Ruby

# frozen_string_literal: true
class FetchReplyWorker
include Sidekiq::Worker
include ExponentialBackoff
sidekiq_options queue: 'pull', retry: 3
def perform(child_url, options = {})
batch = WorkerBatch.new(options.delete('batch_id')) if options['batch_id']
FetchRemoteStatusService.new.call(child_url, **options.symbolize_keys)
ensure
batch&.remove_job(jid)
end
end