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
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2017-06-20 17:09:58 +0300
committerJacob Vosmaer <jacob@gitlab.com>2017-06-20 17:19:43 +0300
commit7bda1030a59b0723eade42b03f72918a75c20e9d (patch)
tree045d3f93fa0458647e49b359845c803ff1df67d2 /lib/gitlab/workhorse.rb
parent76bafc00e62b3a90252f0d229c7ce98c2691da30 (diff)
Send gitaly token to workhorse when needed
Diffstat (limited to 'lib/gitlab/workhorse.rb')
-rw-r--r--lib/gitlab/workhorse.rb11
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