File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ package handler
2121import (
2222 "context"
2323 "fmt"
24+ "github.com/goodrain/rainbond/pkg/component/etcd"
2425 "strings"
2526 "time"
2627
@@ -82,7 +83,7 @@ func (s *ServiceAction) GetServiceCheckInfo(uuid string) (*exector.ServiceCheckR
8283 var si exector.ServiceCheckResult
8384 ctx , cancel := context .WithTimeout (context .Background (), 3 * time .Second )
8485 defer cancel ()
85- resp , err := s . EtcdCli .Get (ctx , k )
86+ resp , err := etcd . Default (). EtcdClient .Get (ctx , k )
8687 if err != nil {
8788 logrus .Errorf ("get etcd k %s error, %v" , k , err )
8889 return nil , util .CreateAPIHandleError (503 , err )
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import (
2727 "github.com/goodrain/rainbond/pkg/component/mq"
2828 "github.com/goodrain/rainbond/pkg/component/prom"
2929 "net/http"
30+ "runtime/debug"
3031 "strings"
3132)
3233
@@ -35,6 +36,7 @@ func Recoverer(next http.Handler) http.Handler {
3536 fn := func (w http.ResponseWriter , r * http.Request ) {
3637 defer func () {
3738 if rvr := recover (); rvr != nil && rvr != http .ErrAbortHandler {
39+ debug .PrintStack ()
3840 handleServiceUnavailable (w , r )
3941 }
4042 }()
You can’t perform that action at this time.
0 commit comments