BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
07537fac
Commit
07537fac
authored
Jul 15, 2014
by
Ayrton Araújo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support to set satellites timeout
parent
a6546f51
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
2 deletions
+7
-2
gitlab.yml.example
config/gitlab.yml.example
+1
-0
1_settings.rb
config/initializers/1_settings.rb
+1
-0
action.rb
lib/gitlab/satellite/action.rb
+1
-1
action_spec.rb
spec/lib/gitlab/satellite/action_spec.rb
+4
-1
No files found.
config/gitlab.yml.example
View file @
07537fac
...
@@ -197,6 +197,7 @@ production: &base
...
@@ -197,6 +197,7 @@ production: &base
satellites:
satellites:
# Relative paths are relative to Rails.root (default: tmp/repo_satellites/)
# Relative paths are relative to Rails.root (default: tmp/repo_satellites/)
path: /home/git/gitlab-satellites/
path: /home/git/gitlab-satellites/
timeout: 30
## Backup settings
## Backup settings
backup:
backup:
...
...
config/initializers/1_settings.rb
View file @
07537fac
...
@@ -139,6 +139,7 @@ Settings.git['timeout'] ||= 10
...
@@ -139,6 +139,7 @@ Settings.git['timeout'] ||= 10
Settings
[
'satellites'
]
||=
Settingslogic
.
new
({})
Settings
[
'satellites'
]
||=
Settingslogic
.
new
({})
Settings
.
satellites
[
'path'
]
=
File
.
expand_path
(
Settings
.
satellites
[
'path'
]
||
"tmp/repo_satellites/"
,
Rails
.
root
)
Settings
.
satellites
[
'path'
]
=
File
.
expand_path
(
Settings
.
satellites
[
'path'
]
||
"tmp/repo_satellites/"
,
Rails
.
root
)
Settings
.
satellites
[
'timeout'
]
||=
30
#
#
# Extra customization
# Extra customization
...
...
lib/gitlab/satellite/action.rb
View file @
07537fac
module
Gitlab
module
Gitlab
module
Satellite
module
Satellite
class
Action
class
Action
DEFAULT_OPTIONS
=
{
git_timeout:
30
.
seconds
}
DEFAULT_OPTIONS
=
{
git_timeout:
Gitlab
.
config
.
satellites
.
timeout
.
seconds
}
attr_accessor
:options
,
:project
,
:user
attr_accessor
:options
,
:project
,
:user
...
...
spec/lib/gitlab/satellite/action_spec.rb
View file @
07537fac
...
@@ -5,6 +5,10 @@ describe 'Gitlab::Satellite::Action' do
...
@@ -5,6 +5,10 @@ describe 'Gitlab::Satellite::Action' do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
describe
'#prepare_satellite!'
do
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
it
'create a repository with a parking branch and one remote: origin'
do
repo
=
project
.
satellite
.
repo
repo
=
project
.
satellite
.
repo
...
@@ -113,4 +117,3 @@ describe 'Gitlab::Satellite::Action' do
...
@@ -113,4 +117,3 @@ describe 'Gitlab::Satellite::Action' do
end
end
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