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
d2d7d5a6
Commit
d2d7d5a6
authored
Mar 10, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set timeout per request on Geo node status service
parent
5fababa5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
app/services/geo/node_status_service.rb
app/services/geo/node_status_service.rb
+5
-4
No files found.
app/services/geo/node_status_service.rb
View file @
d2d7d5a6
...
...
@@ -5,13 +5,10 @@ module Geo
KEYS
=
%w(health repositories_count repositories_synced_count repositories_failed_count lfs_objects_total lfs_objects_synced)
.
freeze
# HTTParty timeout
default_timeout
current_application_settings
.
geo_status_timeout
def
call
(
status_url
)
values
=
begin
response
=
self
.
class
.
get
(
status_url
,
headers:
headers
)
response
=
self
.
class
.
get
(
status_url
,
headers:
headers
,
timeout:
timeout
)
if
response
.
success?
response
.
parsed_response
.
values_at
(
*
KEYS
)
...
...
@@ -30,5 +27,9 @@ module Geo
def
headers
Gitlab
::
Geo
::
BaseRequest
.
new
.
headers
end
def
timeout
current_application_settings
.
geo_status_timeout
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