Skip to content

Commit

Permalink
Merge pull request #5 from vegaprotocol/improve-health-check
Browse files Browse the repository at this point in the history
feat: disable data-node check for the blockexplorer when no data-node endpoint is provided
  • Loading branch information
daniel1302 authored Dec 12, 2023
2 parents 1dfc8a8 + 3b5866a commit 0888130
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/blockexplorer.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,15 @@ func runExplorerHealthCheck(vegaHTTPPort int, coreEndpoint, dataNodeAPIEndpoint,
healthChecks := []checks.HealthCheckFunc{
checks.CheckVegaHttpOnlineWrapper(coreEndpoint),
checks.CompareVegaAndCurrentTime(coreEndpoint),
checks.CheckDataNodeHttpOnlineWrapper(coreEndpoint),
checks.CheckVegaBlockIncreasedWrapper(coreEndpoint, 3*time.Second),
checks.CheckExplorerIsOnlineWrapper(explorerEndpoint),
checks.CheckExplorerTransactionListIsNotEmptyWrapper(explorerEndpoint),
}

if dataNodeAPIEndpoint != "" {
healthChecks = append(healthChecks, checks.CheckDataNodeLagWrapper(dataNodeAPIEndpoint))
healthChecks = append(healthChecks,
checks.CheckDataNodeHttpOnlineWrapper(coreEndpoint),
checks.CheckDataNodeLagWrapper(dataNodeAPIEndpoint))
}

ctx := context.Background()
Expand Down

0 comments on commit 0888130

Please sign in to comment.