Commit 04a2a993 authored by Marius Bobin's avatar Marius Bobin

Decouple project runners queuing query from projects table

Changelog: added
parent 115b29aa
......@@ -47,7 +47,7 @@ module Ci
def builds_for_project_runner
relation = new_builds
.where(project: runner.projects.without_deleted.with_builds_enabled)
.where(project: runner.runner_projects.select(:project_id))
order(relation)
end
......
......@@ -79,12 +79,6 @@ module Ci
expect(execute(shared_runner)).to be_nil
end
end
context 'for specific runner' do
it 'does not pick a build' do
expect(execute(specific_runner)).to be_nil
end
end
end
context 'allow shared runners' do
......@@ -234,12 +228,6 @@ module Ci
it { expect(build).to be_nil }
end
context 'and uses project runner' do
let(:build) { execute(specific_runner) }
it { expect(build).to be_nil }
end
end
context 'allow group runners' do
......
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