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

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

module Environments
  module CanaryIngress
    class UpdateWorker
      include ApplicationWorker

      sidekiq_options retry: false
      idempotent!
      worker_has_external_dependencies!
      feature_category :continuous_delivery

      def perform(environment_id, params)
        Environment.find_by_id(environment_id).try do |environment|
          Environments::CanaryIngress::UpdateService
            .new(environment.project, nil, params.with_indifferent_access)
            .execute(environment)
        end
      end
    end
  end
end