2018-06-27 07:23:28 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-04-21 15:21:10 +00:00
|
|
|
class StageUpdateWorker
|
2017-11-28 16:08:30 +00:00
|
|
|
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
|
2017-07-20 11:30:58 +00:00
|
|
|
include PipelineQueue
|
|
|
|
|
2017-11-28 16:16:50 +00:00
|
|
|
queue_namespace :pipeline_processing
|
2020-03-02 18:07:42 +00:00
|
|
|
urgency :high
|
2017-08-22 12:59:16 +00:00
|
|
|
|
2020-04-21 15:21:10 +00:00
|
|
|
idempotent!
|
|
|
|
|
2017-07-20 11:30:58 +00:00
|
|
|
def perform(stage_id)
|
2020-01-17 15:08:37 +00:00
|
|
|
Ci::Stage.find_by_id(stage_id)&.update_legacy_status
|
2017-07-20 11:30:58 +00:00
|
|
|
end
|
|
|
|
end
|