Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/ci
diff options
context:
space:
mode:
authorKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2016-12-16 18:32:16 +0300
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2016-12-16 18:32:16 +0300
commit24f0a45b0f8558071987ec1d70446f8e9f7df0ec (patch)
tree4c6a58f969dd4eb5a99bea274f012b95f624973a /lib/ci
parentf6263e2ee7288ff1b53b551053911f31ddf846b7 (diff)
Do things in the correct order
Diffstat (limited to 'lib/ci')
-rw-r--r--lib/ci/api/builds.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ci/api/builds.rb b/lib/ci/api/builds.rb
index b1b66313092..8264210c460 100644
--- a/lib/ci/api/builds.rb
+++ b/lib/ci/api/builds.rb
@@ -21,6 +21,8 @@ module Ci
return build_not_found!
end
+ new_update = current_runner.ensure_runner_queue_value
+
build = Ci::RegisterBuildService.new.execute(current_runner)
if build
@@ -31,7 +33,6 @@ module Ci
else
Gitlab::Metrics.add_event(:build_not_found)
- new_update = current_runner.ensure_runner_queue_value
headers 'X-GitLab-Last-Update', new_update
build_not_found!