2018-06-27 07:23:28 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-07-20 11:30:58 +00:00
|
|
|
class StageUpdateWorker
|
2017-11-28 16:08:30 +00:00
|
|
|
include ApplicationWorker
|
2017-07-20 11:30:58 +00:00
|
|
|
include PipelineQueue
|
|
|
|
|
2017-11-28 16:16:50 +00:00
|
|
|
queue_namespace :pipeline_processing
|
2017-08-22 12:59:16 +00:00
|
|
|
|
2018-08-27 15:31:01 +00:00
|
|
|
# rubocop: disable CodeReuse/ActiveRecord
|
2017-07-20 11:30:58 +00:00
|
|
|
def perform(stage_id)
|
2017-07-26 12:50:48 +00:00
|
|
|
Ci::Stage.find_by(id: stage_id).try do |stage|
|
|
|
|
stage.update_status
|
|
|
|
end
|
2017-07-20 11:30:58 +00:00
|
|
|
end
|
2018-08-27 15:31:01 +00:00
|
|
|
# rubocop: enable CodeReuse/ActiveRecord
|
2017-07-20 11:30:58 +00:00
|
|
|
end
|