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
622c912d
Commit
622c912d
authored
Aug 24, 2017
by
Maxim Rydkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace `is_successful?` with `successful?`
parent
78c5d4dd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
9 deletions
+9
-9
lib/gitlab/health_checks/db_check.rb
lib/gitlab/health_checks/db_check.rb
+1
-1
lib/gitlab/health_checks/redis/cache_check.rb
lib/gitlab/health_checks/redis/cache_check.rb
+1
-1
lib/gitlab/health_checks/redis/queues_check.rb
lib/gitlab/health_checks/redis/queues_check.rb
+1
-1
lib/gitlab/health_checks/redis/redis_check.rb
lib/gitlab/health_checks/redis/redis_check.rb
+1
-1
lib/gitlab/health_checks/redis/shared_state_check.rb
lib/gitlab/health_checks/redis/shared_state_check.rb
+1
-1
lib/gitlab/health_checks/simple_abstract_check.rb
lib/gitlab/health_checks/simple_abstract_check.rb
+4
-4
No files found.
lib/gitlab/health_checks/db_check.rb
View file @
622c912d
...
@@ -10,7 +10,7 @@ module Gitlab
...
@@ -10,7 +10,7 @@ module Gitlab
'db_ping'
'db_ping'
end
end
def
is_
successful?
(
result
)
def
successful?
(
result
)
result
==
'1'
result
==
'1'
end
end
...
...
lib/gitlab/health_checks/redis/cache_check.rb
View file @
622c912d
...
@@ -15,7 +15,7 @@ module Gitlab
...
@@ -15,7 +15,7 @@ module Gitlab
'redis_cache_ping'
'redis_cache_ping'
end
end
def
is_
successful?
(
result
)
def
successful?
(
result
)
result
==
'PONG'
result
==
'PONG'
end
end
...
...
lib/gitlab/health_checks/redis/queues_check.rb
View file @
622c912d
...
@@ -15,7 +15,7 @@ module Gitlab
...
@@ -15,7 +15,7 @@ module Gitlab
'redis_queues_ping'
'redis_queues_ping'
end
end
def
is_
successful?
(
result
)
def
successful?
(
result
)
result
==
'PONG'
result
==
'PONG'
end
end
...
...
lib/gitlab/health_checks/redis/redis_check.rb
View file @
622c912d
...
@@ -11,7 +11,7 @@ module Gitlab
...
@@ -11,7 +11,7 @@ module Gitlab
'redis_ping'
'redis_ping'
end
end
def
is_
successful?
(
result
)
def
successful?
(
result
)
result
==
'PONG'
result
==
'PONG'
end
end
...
...
lib/gitlab/health_checks/redis/shared_state_check.rb
View file @
622c912d
...
@@ -15,7 +15,7 @@ module Gitlab
...
@@ -15,7 +15,7 @@ module Gitlab
'redis_shared_state_ping'
'redis_shared_state_ping'
end
end
def
is_
successful?
(
result
)
def
successful?
(
result
)
result
==
'PONG'
result
==
'PONG'
end
end
...
...
lib/gitlab/health_checks/simple_abstract_check.rb
View file @
622c912d
...
@@ -5,7 +5,7 @@ module Gitlab
...
@@ -5,7 +5,7 @@ module Gitlab
def
readiness
def
readiness
check_result
=
check
check_result
=
check
if
is_
successful?
(
check_result
)
if
successful?
(
check_result
)
HealthChecks
::
Result
.
new
(
true
)
HealthChecks
::
Result
.
new
(
true
)
elsif
check_result
.
is_a?
(
Timeout
::
Error
)
elsif
check_result
.
is_a?
(
Timeout
::
Error
)
HealthChecks
::
Result
.
new
(
false
,
"
#{
human_name
}
check timed out"
)
HealthChecks
::
Result
.
new
(
false
,
"
#{
human_name
}
check timed out"
)
...
@@ -16,10 +16,10 @@ module Gitlab
...
@@ -16,10 +16,10 @@ module Gitlab
def
metrics
def
metrics
result
,
elapsed
=
with_timing
(
&
method
(
:check
))
result
,
elapsed
=
with_timing
(
&
method
(
:check
))
Rails
.
logger
.
error
(
"
#{
human_name
}
check returned unexpected result
#{
result
}
"
)
unless
is_
successful?
(
result
)
Rails
.
logger
.
error
(
"
#{
human_name
}
check returned unexpected result
#{
result
}
"
)
unless
successful?
(
result
)
[
[
metric
(
"
#{
metric_prefix
}
_timeout"
,
result
.
is_a?
(
Timeout
::
Error
)
?
1
:
0
),
metric
(
"
#{
metric_prefix
}
_timeout"
,
result
.
is_a?
(
Timeout
::
Error
)
?
1
:
0
),
metric
(
"
#{
metric_prefix
}
_success"
,
is_
successful?
(
result
)
?
1
:
0
),
metric
(
"
#{
metric_prefix
}
_success"
,
successful?
(
result
)
?
1
:
0
),
metric
(
"
#{
metric_prefix
}
_latency_seconds"
,
elapsed
)
metric
(
"
#{
metric_prefix
}
_latency_seconds"
,
elapsed
)
]
]
end
end
...
@@ -30,7 +30,7 @@ module Gitlab
...
@@ -30,7 +30,7 @@ module Gitlab
raise
NotImplementedError
raise
NotImplementedError
end
end
def
is_
successful?
(
result
)
def
successful?
(
result
)
raise
NotImplementedError
raise
NotImplementedError
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