Add error to GetSession return values
- Add button to copy instance SSH access
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
)
|
||||
|
||||
func Ping(rw http.ResponseWriter, req *http.Request) {
|
||||
defer latencyHistogramVec.WithLabelValues("ping").Observe(float64(time.Since(time.Now()).Nanoseconds()) / 1000000)
|
||||
// Get system load average of the last 5 minutes and compare it against a threashold.
|
||||
|
||||
c, err := docker.NewEnvClient()
|
||||
@@ -27,6 +28,7 @@ func Ping(rw http.ResponseWriter, req *http.Request) {
|
||||
if _, err := c.Info(ctx); err != nil && err == context.DeadlineExceeded {
|
||||
log.Printf("Docker info took to long to respond\n")
|
||||
rw.WriteHeader(http.StatusGatewayTimeout)
|
||||
return
|
||||
}
|
||||
|
||||
a, err := load.Avg()
|
||||
|
||||
Reference in New Issue
Block a user