File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ package handler
21
21
import (
22
22
"context"
23
23
"fmt"
24
+ "github.com/goodrain/rainbond/pkg/component/etcd"
24
25
"strings"
25
26
"time"
26
27
@@ -82,7 +83,7 @@ func (s *ServiceAction) GetServiceCheckInfo(uuid string) (*exector.ServiceCheckR
82
83
var si exector.ServiceCheckResult
83
84
ctx , cancel := context .WithTimeout (context .Background (), 3 * time .Second )
84
85
defer cancel ()
85
- resp , err := s . EtcdCli .Get (ctx , k )
86
+ resp , err := etcd . Default (). EtcdClient .Get (ctx , k )
86
87
if err != nil {
87
88
logrus .Errorf ("get etcd k %s error, %v" , k , err )
88
89
return nil , util .CreateAPIHandleError (503 , err )
Original file line number Diff line number Diff line change @@ -26,7 +26,9 @@ import (
26
26
"github.com/goodrain/rainbond/pkg/component/hubregistry"
27
27
"github.com/goodrain/rainbond/pkg/component/mq"
28
28
"github.com/goodrain/rainbond/pkg/component/prom"
29
+ "github.com/sirupsen/logrus"
29
30
"net/http"
31
+ "runtime/debug"
30
32
"strings"
31
33
)
32
34
@@ -35,6 +37,8 @@ func Recoverer(next http.Handler) http.Handler {
35
37
fn := func (w http.ResponseWriter , r * http.Request ) {
36
38
defer func () {
37
39
if rvr := recover (); rvr != nil && rvr != http .ErrAbortHandler {
40
+ debug .PrintStack ()
41
+ logrus .Errorf ("panic: %v" , rvr )
38
42
handleServiceUnavailable (w , r )
39
43
}
40
44
}()
You can’t perform that action at this time.
0 commit comments