diff options
author | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2016-12-16 03:04:18 +0300 |
---|---|---|
committer | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2016-12-16 03:04:18 +0300 |
commit | 811addf2d16bd912efa095b6b5a5f93d620089ec (patch) | |
tree | f46ecd7cf5b95bb1aaa9ed43bd27cd3e4c5a8468 /lib/ci | |
parent | a20681c093d5444d24c54f41fd49a98ef919cd42 (diff) |
#NamingThings
Diffstat (limited to 'lib/ci')
-rw-r--r-- | lib/ci/api/builds.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/ci/api/builds.rb b/lib/ci/api/builds.rb index fb14f043a18..b1b66313092 100644 --- a/lib/ci/api/builds.rb +++ b/lib/ci/api/builds.rb @@ -16,13 +16,9 @@ module Ci not_found! unless current_runner.active? update_runner_info - last_update = current_runner.last_build_queue_update - - if params[:last_update].present? - if params[:last_update] == last_update - headers 'X-GitLab-Last-Update', last_update - return build_not_found! - end + if current_runner.is_runner_queue_value_latest?(params[:last_update]) + headers 'X-GitLab-Last-Update', params[:last_update] + return build_not_found! end build = Ci::RegisterBuildService.new.execute(current_runner) @@ -35,7 +31,7 @@ module Ci else Gitlab::Metrics.add_event(:build_not_found) - new_update = current_runner.tick_update + new_update = current_runner.ensure_runner_queue_value headers 'X-GitLab-Last-Update', new_update build_not_found! |