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

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

module Ci
  module ResourceGroups
    class AssignResourceFromResourceGroupWorker # rubocop:disable Scalability/IdempotentWorker
      include ApplicationWorker
      include PipelineQueue

      queue_namespace :pipeline_processing
      feature_category :continuous_delivery

      def perform(resource_group_id)
        ::Ci::ResourceGroup.find_by_id(resource_group_id).try do |resource_group|
          Ci::ResourceGroups::AssignResourceFromResourceGroupService.new(resource_group.project, nil)
            .execute(resource_group)
        end
      end
    end
  end
end