From 4f7f3258c18dfc207b838401f5ed71a3197eb22d Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 1 Jun 2016 18:34:20 +0800 Subject: Implement the logic for locking runner --- app/models/ci/build.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'app/models/ci/build.rb') 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? -- cgit v1.2.1