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
250bb538
Commit
250bb538
authored
May 18, 2021
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scope pending builds feature flag to a build project
parent
120fb52a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
app/services/ci/update_build_queue_service.rb
app/services/ci/update_build_queue_service.rb
+4
-4
No files found.
app/services/ci/update_build_queue_service.rb
View file @
250bb538
...
...
@@ -14,7 +14,7 @@ module Ci
# Add a build to the pending builds queue
#
def
push
(
build
,
transition
)
return
unless
maintain_pending_builds_queue?
return
unless
maintain_pending_builds_queue?
(
build
)
raise
InvalidQueueTransition
unless
transition
.
to
==
'pending'
...
...
@@ -33,7 +33,7 @@ module Ci
# Remove a build from the pending builds queue
#
def
pop
(
build
,
transition
)
return
unless
maintain_pending_builds_queue?
return
unless
maintain_pending_builds_queue?
(
build
)
raise
InvalidQueueTransition
unless
transition
.
from
==
'pending'
...
...
@@ -70,8 +70,8 @@ module Ci
end
end
def
maintain_pending_builds_queue?
Feature
.
enabled?
(
:ci_pending_builds_queue_maintain
,
default_enabled: :yaml
)
def
maintain_pending_builds_queue?
(
build
)
Feature
.
enabled?
(
:ci_pending_builds_queue_maintain
,
build
.
project
,
default_enabled: :yaml
)
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