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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-24 15:08:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-24 15:08:01 +0300
commitc6373a2cec855c6543a1e035c52099e102dd05ef (patch)
tree507c4d975e1bf559a008d997ad4b07dad14f397e /app/workers/ci
parent6593f1f627938f22090dec5221476772d3ed581d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers/ci')
-rw-r--r--app/workers/ci/resource_groups/assign_resource_from_resource_group_worker.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/app/workers/ci/resource_groups/assign_resource_from_resource_group_worker.rb b/app/workers/ci/resource_groups/assign_resource_from_resource_group_worker.rb
new file mode 100644
index 00000000000..62233d19516
--- /dev/null
+++ b/app/workers/ci/resource_groups/assign_resource_from_resource_group_worker.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+module Ci
+ module ResourceGroups
+ class AssignResourceFromResourceGroupWorker
+ 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