diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2017-06-20 16:09:58 +0200 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2017-06-20 16:19:43 +0200 |
commit | 7bda1030a59b0723eade42b03f72918a75c20e9d (patch) | |
tree | 045d3f93fa0458647e49b359845c803ff1df67d2 /lib | |
parent | 76bafc00e62b3a90252f0d229c7ce98c2691da30 (diff) | |
download | gitlab-ce-7bda1030a59b0723eade42b03f72918a75c20e9d.tar.gz |
Send gitaly token to workhorse when needed
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/workhorse.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb index 7f27317775c..43305f63911 100644 --- a/lib/gitlab/workhorse.rb +++ b/lib/gitlab/workhorse.rb @@ -26,7 +26,10 @@ module Gitlab } if Gitlab.config.gitaly.enabled - address = Gitlab::GitalyClient.address(project.repository_storage) + server = { + address: Gitlab::GitalyClient.address(project.repository_storage), + token: Gitlab::GitalyClient.token(project.repository_storage), + } params[:Repository] = repository.gitaly_repository.to_h feature_enabled = case action.to_s @@ -39,8 +42,10 @@ module Gitlab else raise "Unsupported action: #{action}" end - - params[:GitalyAddress] = address if feature_enabled + if feature_enabled + params[:GitalyAddress] = server[:address] # This field will be deprecated + params[:GitalyServer] = server + end end params |