Welcome to mirror list, hosted at ThFree Co, Russian Federation.

update_head_pipeline_for_merge_request_worker.rb « workers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3a2447b2108320806b3d522a7e6f5fd9bdbb4ff6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# frozen_string_literal: true

class UpdateHeadPipelineForMergeRequestWorker
  include ApplicationWorker

  data_consistency :always

  sidekiq_options retry: 3
  include PipelineQueue

  # NOTE: this worker belongs to :code_review since there is no CI logic.
  queue_namespace :pipeline_processing
  feature_category :continuous_integration

  urgency :high
  worker_resource_boundary :cpu

  idempotent!

  def perform(merge_request_id)
    MergeRequest.find_by_id(merge_request_id).try do |merge_request|
      merge_request.update_head_pipeline
    end
  end
end