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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
d6694100
Commit
d6694100
authored
Oct 30, 2017
by
Alexis Reigel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dry up: extract method
parent
9b836b83
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
15 deletions
+11
-15
app/services/ci/update_build_queue_service.rb
app/services/ci/update_build_queue_service.rb
+11
-15
No files found.
app/services/ci/update_build_queue_service.rb
View file @
d6694100
module
Ci
class
UpdateBuildQueueService
def
execute
(
build
)
build
.
project
.
runners
.
each
do
|
runner
|
if
runner
.
can_pick?
(
build
)
runner
.
tick_runner_queue
end
end
tick_for
(
build
,
build
.
project
.
runners
)
if
build
.
project
.
group_runners_enabled?
Ci
::
Runner
.
belonging_to_group
(
build
.
project_id
).
each
do
|
runner
|
if
runner
.
can_pick?
(
build
)
runner
.
tick_runner_queue
end
end
tick_for
(
build
,
Ci
::
Runner
.
belonging_to_group
(
build
.
project_id
))
end
if
build
.
project
.
shared_runners_enabled?
Ci
::
Runner
.
shared
.
each
do
|
runner
|
if
runner
.
can_pick?
(
build
)
runner
.
tick_runner_queue
tick_for
(
build
,
Ci
::
Runner
.
shared
)
end
end
private
def
tick_for
(
build
,
runners
)
runners
.
each
do
|
runner
|
runner
.
tick_runner_queue
if
runner
.
can_pick?
(
build
)
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