File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88
99 "github.com/gomodule/redigo/redis"
1010 "github.com/threefoldtech/zbus"
11- "github.com/threefoldtech/zos/pkg"
1211 "github.com/threefoldtech/zos/pkg/utils"
1312)
1413
@@ -119,19 +118,24 @@ func (m *DiagnosticsManager) isHealthy() bool {
119118 conn := m .redisPool .Get ()
120119 defer conn .Close ()
121120
122- data , err := conn .Do ("GET" , testNetworkKey )
121+ data , err := redis . Bytes ( conn .Do ("GET" , testNetworkKey ) )
123122 if err != nil || data == nil {
124123 return false
125124 }
126125
127- var result pkg.TaskResult
128- if err := json .Unmarshal (data .([]byte ), & result ); err != nil {
129- return false
126+ var result struct {
127+ Result map [string ][]string `json:"result"`
130128 }
131129
132- if len ( result . Result .( map [ string ] interface {})) != 0 {
130+ if err := json . Unmarshal ( data , & result ); err != nil {
133131 return false
134132 }
135133
134+ for _ , errors := range result .Result {
135+ if len (errors ) > 0 {
136+ return false
137+ }
138+ }
139+
136140 return true
137141}
You can’t perform that action at this time.
0 commit comments