Skip to content

Commit

Permalink
Fix healthcheck command
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidNix committed Aug 18, 2023
1 parent c35ec7f commit f7bc85b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions healtcheck_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/strangelove-ventures/cosmos-operator/internal/cosmos"
"github.com/strangelove-ventures/cosmos-operator/internal/fullnode"
"github.com/strangelove-ventures/cosmos-operator/internal/healthcheck"
"golang.org/x/sync/errgroup"
)
Expand Down Expand Up @@ -49,14 +48,9 @@ func startHealthCheckServer(cmd *cobra.Command, args []string) error {
)
defer func() { _ = zlog.Sync() }()

var (
tm = healthcheck.NewComet(logger, cometClient, rpcHost, timeout)
disk = healthcheck.DiskUsage(fullnode.ChainHomeDir)
)

mux := http.NewServeMux()
mux.Handle("/", tm)
mux.Handle("/disk", disk)
mux.Handle("/", healthcheck.NewComet(logger, cometClient, rpcHost, timeout))
mux.HandleFunc("/disk", healthcheck.DiskUsage)

srv := &http.Server{
Addr: listenAddr,
Expand Down

0 comments on commit f7bc85b

Please sign in to comment.