diff options
author | Stan Hu <stanhu@gmail.com> | 2018-06-17 21:05:56 +0300 |
---|---|---|
committer | Chris Peressini <cperessini@gitlab.com> | 2018-06-19 15:16:07 +0300 |
commit | 28b26c9a4c160d3e00e2ff5aababde80d529059d (patch) | |
tree | 75bdb8cb8ebe63a606248cc1026b05757e720dcd /lib | |
parent | 598e703ab0d809fbdf14608d5ec3378e333925f7 (diff) |
Merge branch 'optimise-paused-runners' into 'master'
Optimise paused runners
See merge request gitlab-org/gitlab-ce!19946
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/runner.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/api/runner.rb b/lib/api/runner.rb index dc102259ca8..96a02914faa 100644 --- a/lib/api/runner.rb +++ b/lib/api/runner.rb @@ -84,7 +84,11 @@ module API end post '/request' do authenticate_runner! - no_content! unless current_runner.active? + + unless current_runner.active? + header 'X-GitLab-Last-Update', current_runner.ensure_runner_queue_value + break no_content! + end if current_runner.runner_queue_value_latest?(params[:last_update]) header 'X-GitLab-Last-Update', params[:last_update] |