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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
a54853e0
Commit
a54853e0
authored
Mar 07, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Geo status connection timeout setting to ApplicationSetting
parent
b546ade1
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
8 deletions
+28
-8
app/controllers/admin/application_settings_controller.rb
app/controllers/admin/application_settings_controller.rb
+2
-1
app/services/geo/node_status_service.rb
app/services/geo/node_status_service.rb
+2
-1
app/views/admin/application_settings/_form.html.haml
app/views/admin/application_settings/_form.html.haml
+13
-0
config/gitlab.yml.example
config/gitlab.yml.example
+0
-5
db/migrate/20170308015651_add_geo_status_timout_to_application_settings.rb
...08015651_add_geo_status_timout_to_application_settings.rb
+9
-0
db/schema.rb
db/schema.rb
+2
-1
No files found.
app/controllers/admin/application_settings_controller.rb
View file @
a54853e0
...
...
@@ -171,7 +171,8 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
:repository_size_limit
,
:shared_runners_minutes
,
:usage_ping_enabled
,
:minimum_mirror_sync_time
:minimum_mirror_sync_time
,
:geo_status_timeout
]
end
end
app/services/geo/node_status_service.rb
View file @
a54853e0
module
Geo
class
NodeStatusService
include
Gitlab
::
CurrentSettings
include
HTTParty
KEYS
=
%w(health repositories_count repositories_synced_count repositories_failed_count)
.
freeze
# HTTParty timeout
default_timeout
Gitlab
.
config
.
gitlab
.
geo_status_timeout
default_timeout
current_application_settings
.
geo_status_timeout
def
call
(
status_url
)
values
=
...
...
app/views/admin/application_settings/_form.html.haml
View file @
a54853e0
...
...
@@ -619,5 +619,18 @@
Maximum time for web terminal websocket connection (in seconds).
0 for unlimited.
-
if
Gitlab
::
Geo
.
license_allows?
%fieldset
%legend
GitLab Geo
%p
These settings will only take effect if Geo is enabled and require a restart to take effect.
.form-group
=
f
.
label
:geo_status_timeout
,
'Connection timeout'
,
class:
'control-label col-sm-2'
.col-sm-10
=
f
.
number_field
:geo_status_timeout
,
class:
'form-control'
.help-block
The amount of seconds after which a request to get a secondary node
status will time out.
.form-actions
=
f
.
submit
'Save'
,
class:
'btn btn-save'
config/gitlab.yml.example
View file @
a54853e0
...
...
@@ -102,11 +102,6 @@ production: &base
# The default is 'shared/cache/archive/' relative to the root of the Rails app.
# repository_downloads_path: shared/cache/archive/
## Geo settings
# NOTE: This will only take effect if Geo is enabled
# Number of seconds to wait for HTTP response after sending status HTTP GET request to secondary nodes (default: 10)
# geo_status_timeout: 10
## Reply by email
# Allow users to comment on issues and merge requests by replying to notification emails.
# For documentation on how to set this up, see http://doc.gitlab.com/ce/administration/reply_by_email.html
...
...
db/migrate/20170308015651_add_geo_status_timout_to_application_settings.rb
0 → 100644
View file @
a54853e0
class
AddGeoStatusTimoutToApplicationSettings
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
def
change
add_column
:application_settings
,
:geo_status_timeout
,
:integer
,
default:
10
end
end
db/schema.rb
View file @
a54853e0
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2017030
6180725
)
do
ActiveRecord
::
Schema
.
define
(
version:
2017030
8015651
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -125,6 +125,7 @@ ActiveRecord::Schema.define(version: 20170306180725) do
t
.
string
"elasticsearch_aws_region"
,
default:
"us-east-1"
t
.
string
"elasticsearch_aws_access_key"
t
.
string
"elasticsearch_aws_secret_access_key"
t
.
integer
"geo_status_timeout"
,
default:
10
end
create_table
"approvals"
,
force: :cascade
do
|
t
|
...
...
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