summaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'http.go')
-rw-r--r--http.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/http.go b/http.go
index 85dc520..5bf5300 100644
--- a/http.go
+++ b/http.go
@@ -59,17 +59,18 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
return
}
if tmp == "/uptime" {
- if clusterHealthy() {
- log.Info("Handling URL:", tmp, "1 GOOD=true")
- fmt.Fprintln(w, "GOOD=true")
+ b, s := clusterHealthy()
+ if b {
+ log.Info("Handling URL:", tmp, "cluster is ok", s)
+ fmt.Fprintln(w, s)
} else {
- log.Info("Handling URL:", tmp, "1 GOOD=false")
- fmt.Fprintln(w, "GOOD=false")
+ log.Info("Handling URL:", tmp, "cluster is not right yet", s)
+ fmt.Fprintln(w, s)
}
for _, h := range me.hypers {
url := "http://" + h.Hostname + ":2520/kill"
dur := time.Since(h.lastpoll) // Calculate the elapsed time
- if dur > 90 * time.Second {
+ if dur > 90*time.Second {
log.Info("KILL DAEMON ON", h.Hostname, shell.FormatDuration(dur), "curl", url)
// s := shell.Wget(url)
// log.Info("curl got:", s)