Commit 2d0fe451 authored by Rémy Coutable's avatar Rémy Coutable Committed by Felipe Artur

Merge branch 'zj-backup-timeout' into 'master'

Remove timeouts for long running requests

See merge request gitlab-org/gitlab-ce!20810
parent 5d390d66
---
title: Disable Gitaly timeouts when creating or restoring backups
merge_request: 20810
author:
type: fixed
......@@ -407,7 +407,7 @@ module Gitlab
# The default timeout on all Gitaly calls
def self.default_timeout
return 0 if Sidekiq.server?
return no_timeout if Sidekiq.server?
timeout(:gitaly_timeout_default)
end
......@@ -420,6 +420,10 @@ module Gitlab
timeout(:gitaly_timeout_medium)
end
def self.no_timeout
0
end
def self.timeout(timeout_name)
Gitlab::CurrentSettings.current_application_settings[timeout_name]
end
......
......@@ -202,7 +202,7 @@ module Gitlab
save_path,
:create_bundle,
Gitaly::CreateBundleRequest,
GitalyClient.default_timeout
GitalyClient.no_timeout
)
end
......@@ -220,7 +220,7 @@ module Gitlab
bundle_path,
:create_repository_from_bundle,
Gitaly::CreateRepositoryFromBundleRequest,
GitalyClient.default_timeout
GitalyClient.no_timeout
)
end
......@@ -245,7 +245,7 @@ module Gitlab
:repository_service,
:create_repository_from_snapshot,
request,
timeout: GitalyClient.default_timeout
timeout: GitalyClient.no_timeout
)
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment