Commit e659b398 authored by Rémy Coutable's avatar Rémy Coutable

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

Remove timeouts for long running requests

See merge request gitlab-org/gitlab-ce!20810
parents a90a080a e77f46d1
---
title: Disable Gitaly timeouts when creating or restoring backups
merge_request: 20810
author:
type: fixed
...@@ -407,7 +407,7 @@ module Gitlab ...@@ -407,7 +407,7 @@ module Gitlab
# The default timeout on all Gitaly calls # The default timeout on all Gitaly calls
def self.default_timeout def self.default_timeout
return 0 if Sidekiq.server? return no_timeout if Sidekiq.server?
timeout(:gitaly_timeout_default) timeout(:gitaly_timeout_default)
end end
...@@ -420,6 +420,10 @@ module Gitlab ...@@ -420,6 +420,10 @@ module Gitlab
timeout(:gitaly_timeout_medium) timeout(:gitaly_timeout_medium)
end end
def self.no_timeout
0
end
def self.timeout(timeout_name) def self.timeout(timeout_name)
Gitlab::CurrentSettings.current_application_settings[timeout_name] Gitlab::CurrentSettings.current_application_settings[timeout_name]
end end
......
...@@ -202,7 +202,7 @@ module Gitlab ...@@ -202,7 +202,7 @@ module Gitlab
save_path, save_path,
:create_bundle, :create_bundle,
Gitaly::CreateBundleRequest, Gitaly::CreateBundleRequest,
GitalyClient.default_timeout GitalyClient.no_timeout
) )
end end
...@@ -220,7 +220,7 @@ module Gitlab ...@@ -220,7 +220,7 @@ module Gitlab
bundle_path, bundle_path,
:create_repository_from_bundle, :create_repository_from_bundle,
Gitaly::CreateRepositoryFromBundleRequest, Gitaly::CreateRepositoryFromBundleRequest,
GitalyClient.default_timeout GitalyClient.no_timeout
) )
end end
...@@ -245,7 +245,7 @@ module Gitlab ...@@ -245,7 +245,7 @@ module Gitlab
:repository_service, :repository_service,
:create_repository_from_snapshot, :create_repository_from_snapshot,
request, request,
timeout: GitalyClient.default_timeout timeout: GitalyClient.no_timeout
) )
end 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