Fix number of new replies increasing even if reply was not fetched (#35577)
This commit is contained in:
@@ -7,9 +7,9 @@ class FetchReplyWorker
|
|||||||
sidekiq_options queue: 'pull', retry: 3
|
sidekiq_options queue: 'pull', retry: 3
|
||||||
|
|
||||||
def perform(child_url, options = {})
|
def perform(child_url, options = {})
|
||||||
batch = WorkerBatch.new(options.delete('batch_id')) if options['batch_id']
|
batch = WorkerBatch.new(options.delete('batch_id')) if options['batch_id']
|
||||||
FetchRemoteStatusService.new.call(child_url, **options.symbolize_keys)
|
result = FetchRemoteStatusService.new.call(child_url, **options.symbolize_keys)
|
||||||
ensure
|
ensure
|
||||||
batch&.remove_job(jid, increment: true)
|
batch&.remove_job(jid, increment: result.present?)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user