summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-03-06 16:34:52 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2015-03-06 16:35:30 +0100
commitb908541cb3eee4bcafa521cbe0a4645bd6182f20 (patch)
treecf2e37254c010f1b1abbb6d53391801632f750a3 /lib/api
parent0c71a4c41465cd620e163e081f31567ce59de766 (diff)
downloadgitlab-ci-b908541cb3eee4bcafa521cbe0a4645bd6182f20.tar.gz
Allow to pause runners - when paused runner will not receive any new build
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/builds.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/builds.rb b/lib/api/builds.rb
index e33491a..bed20ac 100644
--- a/lib/api/builds.rb
+++ b/lib/api/builds.rb
@@ -13,6 +13,8 @@ module API
authenticate_runner!
update_runner_last_contact
required_attributes! [:token]
+ not_found! unless current_runner.active?
+
build = RegisterBuildService.new.execute(current_runner)
if build