diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-24 15:08:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-24 15:08:01 +0300 |
commit | c6373a2cec855c6543a1e035c52099e102dd05ef (patch) | |
tree | 507c4d975e1bf559a008d997ad4b07dad14f397e /app/workers/ci | |
parent | 6593f1f627938f22090dec5221476772d3ed581d (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.rb | 20 |
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 |