Skip to content

Commit

Permalink
fix health check duplicate check
Browse files Browse the repository at this point in the history
  • Loading branch information
aryanmehrotra committed Jul 8, 2024
1 parent db30735 commit 5773079
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions pkg/gofr/container/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ package container

import (
"context"
"fmt"
"reflect"
"strings"
)

func (c *Container) Health(ctx context.Context) interface{} {
Expand Down Expand Up @@ -33,33 +31,6 @@ func (c *Container) Health(ctx context.Context) interface{} {
healthMap["redis"] = health
}

if !isNil(c.Mongo) {
health := c.Redis.HealthCheck()
if strings.Contains(fmt.Sprint(health), "DOWN") {
downCount++
}

healthMap["mongo"] = health
}

if !isNil(c.Cassandra) {
health := c.Redis.HealthCheck()
if strings.Contains(fmt.Sprint(health), "DOWN") {
downCount++
}

healthMap["cassandra"] = health
}

if !isNil(c.Clickhouse) {
health := c.Redis.HealthCheck()
if strings.Contains(fmt.Sprint(health), "DOWN") {
downCount++
}

healthMap["clickHouse"] = health
}

if c.PubSub != nil {
health := c.PubSub.Health()
if health.Status == statusDown {
Expand Down

0 comments on commit 5773079

Please sign in to comment.