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
Boxiang Sun
gitlab-ce
Commits
37f27079
Commit
37f27079
authored
Jul 25, 2017
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix redis check with_timing method usage
parent
b1d6670d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
lib/gitlab/health_checks/simple_abstract_check.rb
lib/gitlab/health_checks/simple_abstract_check.rb
+7
-8
No files found.
lib/gitlab/health_checks/simple_abstract_check.rb
View file @
37f27079
...
...
@@ -15,14 +15,13 @@ module Gitlab
end
def
metrics
with_timing
method
(
:check
)
do
|
result
,
elapsed
|
Rails
.
logger
.
error
(
"
#{
human_name
}
check returned unexpected result
#{
result
}
"
)
unless
is_successful?
(
result
)
[
metric
(
"
#{
metric_prefix
}
_timeout"
,
result
.
is_a?
(
Timeout
::
Error
)
?
1
:
0
),
metric
(
"
#{
metric_prefix
}
_success"
,
is_successful?
(
result
)
?
1
:
0
),
metric
(
"
#{
metric_prefix
}
_latency_seconds"
,
elapsed
)
]
end
result
,
elapsed
=
with_timing
(
&
method
(
:check
))
Rails
.
logger
.
error
(
"
#{
human_name
}
check returned unexpected result
#{
result
}
"
)
unless
is_successful?
(
result
)
[
metric
(
"
#{
metric_prefix
}
_timeout"
,
result
.
is_a?
(
Timeout
::
Error
)
?
1
:
0
),
metric
(
"
#{
metric_prefix
}
_success"
,
is_successful?
(
result
)
?
1
:
0
),
metric
(
"
#{
metric_prefix
}
_latency_seconds"
,
elapsed
)
]
end
private
...
...
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