Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9aa02e07
Commit
9aa02e07
authored
Sep 20, 2021
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update pending builds namespace traversal ids
Changelog: performance
parent
75b31127
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
app/services/projects/update_service.rb
app/services/projects/update_service.rb
+18
-5
No files found.
app/services/projects/update_service.rb
View file @
9aa02e07
...
...
@@ -105,7 +105,7 @@ module Projects
end
update_pages_config
if
changing_pages_related_config?
update_pending_builds
if
shared_runner
s_toggled?
update_pending_builds
if
runners_setting
s_toggled?
end
def
after_rename_service
(
project
)
...
...
@@ -181,13 +181,26 @@ module Projects
end
def
update_pending_builds
update_params
=
{
instance_runners_enabled:
project
.
shared_runners_enabled
}
update_params
=
{
instance_runners_enabled:
project
.
shared_runners_enabled?
,
namespace_traversal_ids:
group_runner_traversal_ids
}
::
Ci
::
UpdatePendingBuildService
.
new
(
project
,
update_params
).
execute
::
Ci
::
UpdatePendingBuildService
.
new
(
project
,
update_params
)
.
execute
end
def
shared_runners_toggled?
project
.
previous_changes
.
include?
(
'shared_runners_enabled'
)
def
runners_settings_toggled?
(
%w[shared_runners_enabled group_runners_enabled]
&
project
.
previous_changes
).
any?
end
def
group_runner_traversal_ids
if
project
.
group_runners_enabled?
project
.
namespace
.
traversal_ids
else
[]
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment