summaryrefslogtreecommitdiff
path: root/app/models/ci/build.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-06-01 18:34:20 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-06-09 16:00:24 +0800
commit4f7f3258c18dfc207b838401f5ed71a3197eb22d (patch)
tree000b69e4ab22149b118daa6fae1f23c8d6c10088 /app/models/ci/build.rb
parent860760120843ea5ad003cc2f52b28cf0fc7c647b (diff)
downloadgitlab-ce-4f7f3258c18dfc207b838401f5ed71a3197eb22d.tar.gz
Implement the logic for locking runner
Diffstat (limited to 'app/models/ci/build.rb')
-rw-r--r--app/models/ci/build.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index b8ada6361ac..860ac16eefd 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -291,9 +291,7 @@ module Ci
end
def can_be_served?(runner)
- return false unless has_tags? || runner.run_untagged?
-
- (tag_list - runner.tag_list).empty?
+ runner.can_serve?(self)
end
def has_tags?