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/services/groups/transfer_service.rb | |
parent | 915a5b6e89195aab5d7eb0deb16e4825cfce509e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/groups/transfer_service.rb')
-rw-r--r-- | app/services/groups/transfer_service.rb | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/app/services/groups/transfer_service.rb b/app/services/groups/transfer_service.rb index cd89eb799dc..f0582106df5 100644 --- a/app/services/groups/transfer_service.rb +++ b/app/services/groups/transfer_service.rb @@ -29,11 +29,11 @@ module Groups update_group_attributes ensure_ownership update_integrations - update_pending_builds! end post_update_hooks(@updated_project_ids) propagate_integrations + update_pending_builds true end @@ -228,13 +228,19 @@ module Groups end end - def update_pending_builds! - update_params = { + def update_pending_builds + if Feature.enabled?(:ci_pending_builds_async_update, default_enabled: :yaml) + ::Ci::PendingBuilds::UpdateGroupWorker.perform_async(group.id, pending_builds_params) + else + ::Ci::UpdatePendingBuildService.new(group, pending_builds_params).execute + end + end + + def pending_builds_params + { namespace_traversal_ids: group.traversal_ids, namespace_id: group.id } - - ::Ci::UpdatePendingBuildService.new(group, update_params).execute end end end |