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
Jérome Perrin
gitlab-ce
Commits
ed234e34
Commit
ed234e34
authored
Jul 23, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7316 from ayr-ton/master
Add support to set satellites timeout
parents
136ff572
07537fac
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
2 deletions
+7
-2
config/gitlab.yml.example
config/gitlab.yml.example
+1
-0
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+1
-0
lib/gitlab/satellite/action.rb
lib/gitlab/satellite/action.rb
+1
-1
spec/lib/gitlab/satellite/action_spec.rb
spec/lib/gitlab/satellite/action_spec.rb
+4
-1
No files found.
config/gitlab.yml.example
View file @
ed234e34
...
...
@@ -197,6 +197,7 @@ production: &base
satellites:
# Relative paths are relative to Rails.root (default: tmp/repo_satellites/)
path: /home/git/gitlab-satellites/
timeout: 30
## Backup settings
backup:
...
...
config/initializers/1_settings.rb
View file @
ed234e34
...
...
@@ -139,6 +139,7 @@ Settings.git['timeout'] ||= 10
Settings
[
'satellites'
]
||=
Settingslogic
.
new
({})
Settings
.
satellites
[
'path'
]
=
File
.
expand_path
(
Settings
.
satellites
[
'path'
]
||
"tmp/repo_satellites/"
,
Rails
.
root
)
Settings
.
satellites
[
'timeout'
]
||=
30
#
# Extra customization
...
...
lib/gitlab/satellite/action.rb
View file @
ed234e34
module
Gitlab
module
Satellite
class
Action
DEFAULT_OPTIONS
=
{
git_timeout:
30
.
seconds
}
DEFAULT_OPTIONS
=
{
git_timeout:
Gitlab
.
config
.
satellites
.
timeout
.
seconds
}
attr_accessor
:options
,
:project
,
:user
...
...
spec/lib/gitlab/satellite/action_spec.rb
View file @
ed234e34
...
...
@@ -5,6 +5,10 @@ describe 'Gitlab::Satellite::Action' do
let
(
:user
)
{
create
(
:user
)
}
describe
'#prepare_satellite!'
do
it
'should be able to fetch timeout from conf'
do
Gitlab
.
config
.
satellites
.
timeout
=
30
DEFAULT_OPTIONS
[
'git_timeout'
].
should
==
30
.
seconds
end
it
'create a repository with a parking branch and one remote: origin'
do
repo
=
project
.
satellite
.
repo
...
...
@@ -113,4 +117,3 @@ describe 'Gitlab::Satellite::Action' do
end
end
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