Commit d954a5c5 by Spencer Gibb

Merge pull request #621 from ametiste-oss/health-check-without-circuit-fails-fixed

Health check fails on commands without circuit breaker.
parents 509c8e9f 5d3a0da5
...@@ -47,7 +47,7 @@ public class HystrixHealthIndicator extends AbstractHealthIndicator { ...@@ -47,7 +47,7 @@ public class HystrixHealthIndicator extends AbstractHealthIndicator {
for (HystrixCommandMetrics metrics : HystrixCommandMetrics.getInstances()) { for (HystrixCommandMetrics metrics : HystrixCommandMetrics.getInstances()) {
HystrixCircuitBreaker circuitBreaker = HystrixCircuitBreaker.Factory HystrixCircuitBreaker circuitBreaker = HystrixCircuitBreaker.Factory
.getInstance(metrics.getCommandKey()); .getInstance(metrics.getCommandKey());
if (circuitBreaker.isOpen()) { if (circuitBreaker != null && circuitBreaker.isOpen()) {
openCircuitBreakers.add(metrics.getCommandGroup().name() + "::" openCircuitBreakers.add(metrics.getCommandGroup().name() + "::"
+ metrics.getCommandKey().name()); + metrics.getCommandKey().name());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment