diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-11 15:13:01 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-11 15:13:01 +0000 |
commit | 046d6f52772ada2e08af58627f03bc18e0c932b5 (patch) | |
tree | 798d9218ecbc945593bc7d592199e78c613b9b4d /lib/api | |
parent | cb787abec6e64a220b2807469023f4de210dac10 (diff) | |
download | gitlab-ce-046d6f52772ada2e08af58627f03bc18e0c932b5.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/ci/helpers/runner.rb | 8 | ||||
-rw-r--r-- | lib/api/helpers.rb | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/api/ci/helpers/runner.rb b/lib/api/ci/helpers/runner.rb index b9662b822fb..dabb6c7ab3a 100644 --- a/lib/api/ci/helpers/runner.rb +++ b/lib/api/ci/helpers/runner.rb @@ -42,8 +42,7 @@ module API token = params[:token] if token - ::Gitlab::Database::LoadBalancing::RackMiddleware - .stick_or_unstick(env, :runner, token) + ::Ci::Runner.sticking.stick_or_unstick_request(env, :runner, token) end strong_memoize(:current_runner) do @@ -80,8 +79,9 @@ module API id = params[:id] if id - ::Gitlab::Database::LoadBalancing::RackMiddleware - .stick_or_unstick(env, :build, id) + ::Ci::Build + .sticking + .stick_or_unstick_request(env, :build, id) end strong_memoize(:current_job) do diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index c189fde503a..ff3590d6c13 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -75,8 +75,9 @@ module API save_current_user_in_env(@current_user) if @current_user if @current_user - ::Gitlab::Database::LoadBalancing::RackMiddleware - .stick_or_unstick(env, :user, @current_user.id) + ::ApplicationRecord + .sticking + .stick_or_unstick_request(env, :user, @current_user.id) end @current_user |