You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
445 B
15 lines
445 B
# 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'] |
|
result = FetchRemoteStatusService.new.call(child_url, **options.symbolize_keys) |
|
ensure |
|
batch&.remove_job(jid, increment: result&.previously_new_record?) |
|
end |
|
end
|
|
|