diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-03 00:09:01 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-03 00:09:01 +0000 |
commit | ff92da4f3468c342862dbcd5b69c01e86e2bcc3d (patch) | |
tree | 2abc8ff1c86b90bcfd9b05709cf26b70c0f16675 /app/services/groups | |
parent | e7f5f860cfb0281e17a4d80cbe8507486614320f (diff) | |
download | gitlab-ce-ff92da4f3468c342862dbcd5b69c01e86e2bcc3d.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/groups')
-rw-r--r-- | app/services/groups/update_shared_runners_service.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/services/groups/update_shared_runners_service.rb b/app/services/groups/update_shared_runners_service.rb index 639c5bf6ae0..eb6b46a5613 100644 --- a/app/services/groups/update_shared_runners_service.rb +++ b/app/services/groups/update_shared_runners_service.rb @@ -8,6 +8,7 @@ module Groups validate_params update_shared_runners + update_pending_builds! success @@ -26,5 +27,13 @@ module Groups def update_shared_runners group.update_shared_runners_setting!(params[:shared_runners_setting]) end + + def update_pending_builds! + return unless group.previous_changes.include?('shared_runners_enabled') + + update_params = { instance_runners_enabled: group.shared_runners_enabled } + + ::Ci::UpdatePendingBuildService.new(group, update_params).execute + end end end |