Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
f7a13c56
Commit
f7a13c56
authored
Nov 01, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@master
parent
9b8d0d89
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
3 deletions
+34
-3
changelogs/unreleased/sh-fix-grpc-timeouts-backup.yml
changelogs/unreleased/sh-fix-grpc-timeouts-backup.yml
+5
-0
lib/gitlab/gitaly_client.rb
lib/gitlab/gitaly_client.rb
+7
-3
spec/lib/gitlab/gitaly_client_spec.rb
spec/lib/gitlab/gitaly_client_spec.rb
+22
-0
No files found.
changelogs/unreleased/sh-fix-grpc-timeouts-backup.yml
0 → 100644
View file @
f7a13c56
---
title
:
Extend gRPC timeouts for Rake tasks
merge_request
:
19461
author
:
type
:
fixed
lib/gitlab/gitaly_client.rb
View file @
f7a13c56
...
...
@@ -383,13 +383,17 @@ module Gitlab
end
def
self
.
long_timeout
if
Sidekiq
.
server?
6
.
hours
else
if
web_app_server?
default_timeout
else
6
.
hours
end
end
def
self
.
web_app_server?
defined?
(
::
Unicorn
)
||
defined?
(
::
Puma
)
end
def
self
.
storage_metadata_file_path
(
storage
)
Gitlab
::
GitalyClient
::
StorageSettings
.
allow_disk_access
do
File
.
join
(
...
...
spec/lib/gitlab/gitaly_client_spec.rb
View file @
f7a13c56
...
...
@@ -17,6 +17,28 @@ describe Gitlab::GitalyClient do
})
end
describe
'.long_timeout'
do
context
'default case'
do
it
{
expect
(
subject
.
long_timeout
).
to
eq
(
6
.
hours
)
}
end
context
'running in Unicorn'
do
before
do
stub_const
(
'Unicorn'
,
1
)
end
it
{
expect
(
subject
.
long_timeout
).
to
eq
(
55
)
}
end
context
'running in Puma'
do
before
do
stub_const
(
'Puma'
,
1
)
end
it
{
expect
(
subject
.
long_timeout
).
to
eq
(
55
)
}
end
end
describe
'.filesystem_id_from_disk'
do
it
'catches errors'
do
[
Errno
::
ENOENT
,
Errno
::
EACCES
,
JSON
::
ParserError
].
each
do
|
error
|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment