diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-12-01 01:17:41 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-12-05 18:34:41 +0300 |
commit | 1efb219561a3be804c30de8e0a74cbfc85b1a4cd (patch) | |
tree | 4835c94fb1db10acbdbd846805ed3913829ffde0 /app/models/ci/runner.rb | |
parent | 844d95fb74d0732d4354c4d0ebfdaa5d12e5588e (diff) |
Perform SQL matching of Build&Runner tags to greatly speed-up job picking
Diffstat (limited to 'app/models/ci/runner.rb')
-rw-r--r-- | app/models/ci/runner.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/ci/runner.rb b/app/models/ci/runner.rb index d39610a8995..dcbb397fb78 100644 --- a/app/models/ci/runner.rb +++ b/app/models/ci/runner.rb @@ -112,7 +112,7 @@ module Ci def can_pick?(build) return false if self.ref_protected? && !build.protected? - assignable_for?(build.project) && accepting_tags?(build) + assignable_for?(build.project_id) && accepting_tags?(build) end def only_for?(project) @@ -171,8 +171,8 @@ module Ci end end - def assignable_for?(project) - is_shared? || projects.exists?(id: project.id) + def assignable_for?(project_id) + is_shared? || projects.exists?(id: project_id) end def accepting_tags?(build) |