Commit 2261188f authored by Dylan Griffith's avatar Dylan Griffith

Rename Runner#invalidate_build_cache -> Runner#pick_build

parent 0e5c1a89
...@@ -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
......
...@@ -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
......
...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment