summaryrefslogtreecommitdiff
path: root/lib/gitlab/workhorse.rb
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2017-07-06 14:45:29 +0200
committerJacob Vosmaer <jacob@gitlab.com>2017-07-07 12:48:34 +0200
commit78089d1153ce9a2e3d32cbcaafb8f9757c56a9d4 (patch)
treef0f57d7fea851bf85b4c14449161ef38ffd8a00c /lib/gitlab/workhorse.rb
parentf63ca524c9d80107d2328e3d8175d04aad9b4b8a (diff)
downloadgitlab-ce-78089d1153ce9a2e3d32cbcaafb8f9757c56a9d4.tar.gz
Remove option to disable Gitaly completely
Diffstat (limited to 'lib/gitlab/workhorse.rb')
-rw-r--r--lib/gitlab/workhorse.rb40
1 files changed, 19 insertions, 21 deletions
diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb
index f96ee69096d..4aef23b6aee 100644
--- a/lib/gitlab/workhorse.rb
+++ b/lib/gitlab/workhorse.rb
@@ -25,27 +25,25 @@ module Gitlab
RepoPath: repo_path
}
- if Gitlab.config.gitaly.enabled
- 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
- when 'git_receive_pack'
- Gitlab::GitalyClient.feature_enabled?(:post_receive_pack)
- when 'git_upload_pack'
- Gitlab::GitalyClient.feature_enabled?(:post_upload_pack)
- when 'info_refs'
- true
- else
- raise "Unsupported action: #{action}"
- end
- if feature_enabled
- params[:GitalyAddress] = server[:address] # This field will be deprecated
- params[:GitalyServer] = server
- end
+ 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
+ when 'git_receive_pack'
+ Gitlab::GitalyClient.feature_enabled?(:post_receive_pack)
+ when 'git_upload_pack'
+ Gitlab::GitalyClient.feature_enabled?(:post_upload_pack)
+ when 'info_refs'
+ true
+ else
+ raise "Unsupported action: #{action}"
+ end
+ if feature_enabled
+ params[:GitalyAddress] = server[:address] # This field will be deprecated
+ params[:GitalyServer] = server
end
params