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
path: root/lib
diff options
context:
space:
mode:
authorAndrew Newdigate <andrew@gitlab.com>2018-07-11 13:52:48 +0300
committerAndrew Newdigate <andrew@gitlab.com>2018-07-11 14:11:42 +0300
commit7ee5b1f6fb4e4e77111a194631476456cf4f9f97 (patch)
tree9b05f80c68ffc265a5205f6e62977efa54376485 /lib
parent67708aa57874c7ae33581ca9f217fde82ce7be76 (diff)
Add a fast_timeout for the `ServerService.ServerInfo` endpoint
Diffstat (limited to 'lib')
-rw-r--r--lib/gitaly/server.rb2
-rw-r--r--lib/gitlab/gitaly_client/server_service.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitaly/server.rb b/lib/gitaly/server.rb
index 2760211fee8..f95e423ef22 100644
--- a/lib/gitaly/server.rb
+++ b/lib/gitaly/server.rb
@@ -50,7 +50,7 @@ module Gitaly
@info ||=
begin
Gitlab::GitalyClient::ServerService.new(@storage).info
- rescue GRPC::Unavailable, GRPC::GRPC::DeadlineExceeded
+ rescue GRPC::Unavailable, GRPC::DeadlineExceeded
# This will show the server as being out of date
Gitaly::ServerInfoResponse.new(git_version: '', server_version: '', storage_statuses: [])
end
diff --git a/lib/gitlab/gitaly_client/server_service.rb b/lib/gitlab/gitaly_client/server_service.rb
index 2e1076d1f66..ad898278353 100644
--- a/lib/gitlab/gitaly_client/server_service.rb
+++ b/lib/gitlab/gitaly_client/server_service.rb
@@ -9,7 +9,7 @@ module Gitlab
end
def info
- GitalyClient.call(@storage, :server_service, :server_info, Gitaly::ServerInfoRequest.new)
+ GitalyClient.call(@storage, :server_service, :server_info, Gitaly::ServerInfoRequest.new, timeout: GitalyClient.fast_timeout)
end
end
end