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
2261188f
Commit
2261188f
authored
May 02, 2018
by
Dylan Griffith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename Runner#invalidate_build_cache -> Runner#pick_build
parent
0e5c1a89
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
app/models/ci/runner.rb
app/models/ci/runner.rb
+1
-1
app/services/ci/update_build_queue_service.rb
app/services/ci/update_build_queue_service.rb
+1
-1
spec/models/ci/runner_spec.rb
spec/models/ci/runner_spec.rb
+3
-3
No files found.
app/models/ci/runner.rb
View file @
2261188f
...
@@ -205,7 +205,7 @@ module Ci
...
@@ -205,7 +205,7 @@ module Ci
end
end
end
end
def
invalidate_build_cache
!
(
build
)
def
pick_build
!
(
build
)
if
can_pick?
(
build
)
if
can_pick?
(
build
)
tick_runner_queue
tick_runner_queue
end
end
...
...
app/services/ci/update_build_queue_service.rb
View file @
2261188f
...
@@ -8,7 +8,7 @@ module Ci
...
@@ -8,7 +8,7 @@ module Ci
def
tick_for
(
build
,
runners
)
def
tick_for
(
build
,
runners
)
runners
.
each
do
|
runner
|
runners
.
each
do
|
runner
|
runner
.
invalidate_build_cache
!
(
build
)
runner
.
pick_build
!
(
build
)
end
end
end
end
end
end
...
...
spec/models/ci/runner_spec.rb
View file @
2261188f
...
@@ -792,7 +792,7 @@ describe Ci::Runner do
...
@@ -792,7 +792,7 @@ describe Ci::Runner do
end
end
end
end
describe
'#
invalidate_build_cache
!'
do
describe
'#
pick_build
!'
do
context
'runner can pick the build'
do
context
'runner can pick the build'
do
it
'calls #tick_runner_queue'
do
it
'calls #tick_runner_queue'
do
ci_build
=
build
:ci_build
ci_build
=
build
:ci_build
...
@@ -801,7 +801,7 @@ describe Ci::Runner do
...
@@ -801,7 +801,7 @@ describe Ci::Runner do
expect
(
runner
).
to
receive
(
:tick_runner_queue
)
expect
(
runner
).
to
receive
(
:tick_runner_queue
)
runner
.
invalidate_build_cache
!
(
ci_build
)
runner
.
pick_build
!
(
ci_build
)
end
end
end
end
...
@@ -813,7 +813,7 @@ describe Ci::Runner do
...
@@ -813,7 +813,7 @@ describe Ci::Runner do
expect
(
runner
).
not_to
receive
(
:tick_runner_queue
)
expect
(
runner
).
not_to
receive
(
:tick_runner_queue
)
runner
.
invalidate_build_cache
!
(
ci_build
)
runner
.
pick_build
!
(
ci_build
)
end
end
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