diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-30 15:10:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-30 15:10:26 +0300 |
commit | 19c9422e1f3792680aa3f9e6190218b31a838fe3 (patch) | |
tree | 36deaed9777d38e0acea456d3aacaf5b5f800958 /app/workers/ci/pending_builds/update_group_worker.rb | |
parent | 915a5b6e89195aab5d7eb0deb16e4825cfce509e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers/ci/pending_builds/update_group_worker.rb')
-rw-r--r-- | app/workers/ci/pending_builds/update_group_worker.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/workers/ci/pending_builds/update_group_worker.rb b/app/workers/ci/pending_builds/update_group_worker.rb new file mode 100644 index 00000000000..3ee3a9116d8 --- /dev/null +++ b/app/workers/ci/pending_builds/update_group_worker.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Ci + module PendingBuilds + class UpdateGroupWorker + include ApplicationWorker + include PipelineBackgroundQueue + + data_consistency :always + idempotent! + + def perform(group_id, update_params) + ::Group.find_by_id(group_id).try do |group| + ::Ci::UpdatePendingBuildService.new(group, update_params).execute + end + end + end + end +end |