File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 8
8
9
9
"github.com/gomodule/redigo/redis"
10
10
"github.com/threefoldtech/zbus"
11
- "github.com/threefoldtech/zos/pkg"
12
11
"github.com/threefoldtech/zos/pkg/utils"
13
12
)
14
13
@@ -119,19 +118,24 @@ func (m *DiagnosticsManager) isHealthy() bool {
119
118
conn := m .redisPool .Get ()
120
119
defer conn .Close ()
121
120
122
- data , err := conn .Do ("GET" , testNetworkKey )
121
+ data , err := redis . Bytes ( conn .Do ("GET" , testNetworkKey ) )
123
122
if err != nil || data == nil {
124
123
return false
125
124
}
126
125
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"`
130
128
}
131
129
132
- if len ( result . Result .( map [ string ] interface {})) != 0 {
130
+ if err := json . Unmarshal ( data , & result ); err != nil {
133
131
return false
134
132
}
135
133
134
+ for _ , errors := range result .Result {
135
+ if len (errors ) > 0 {
136
+ return false
137
+ }
138
+ }
139
+
136
140
return true
137
141
}
You can’t perform that action at this time.
0 commit comments