2020-12-10 15:10:12 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Ci
|
|
|
|
class TestFailureHistoryWorker
|
|
|
|
include ApplicationWorker
|
2021-04-30 18:10:09 +00:00
|
|
|
|
2021-07-21 12:09:35 +00:00
|
|
|
data_consistency :always
|
|
|
|
|
2021-04-30 18:10:09 +00:00
|
|
|
sidekiq_options retry: 3
|
2020-12-10 15:10:12 +00:00
|
|
|
include PipelineBackgroundQueue
|
|
|
|
|
|
|
|
idempotent!
|
|
|
|
|
|
|
|
def perform(pipeline_id)
|
|
|
|
Ci::Pipeline.find_by_id(pipeline_id).try do |pipeline|
|
|
|
|
Ci::TestFailureHistoryService.new(pipeline).execute
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|