File tree 1 file changed +6
-10
lines changed
1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -172,22 +172,18 @@ func (w *workerManager) runWorker() {
172
172
//监听cert-mgr的pod运行情况
173
173
func (w * workerManager ) monitorCertMgr () {
174
174
175
- //临时存储pod status 每过10s判断pod状态是否更改,若更改则发送消息。
176
- podStatusTmp := " "
177
175
for {
178
176
time .Sleep (10 * time .Second )
179
177
podStatusInfo , err := w .getPodStatus ()
180
178
if err != nil {
179
+ glog .Error (err )
181
180
return
182
181
}
183
- if podStatusInfo .Status != podStatusTmp {
184
- podStatusTmp = podStatusInfo .Status
185
- respB , _ := json .Marshal (podStatusInfo )
186
- w .chans .ResponseChan <- & model.Packet {
187
- Key : "cluster:" + model .ClusterId ,
188
- Type : model .CertManagerStatus ,
189
- Payload : string (respB ),
190
- }
182
+ respB , _ := json .Marshal (podStatusInfo )
183
+ w .chans .ResponseChan <- & model.Packet {
184
+ Key : "cluster:" + model .ClusterId ,
185
+ Type : model .CertManagerStatus ,
186
+ Payload : string (respB ),
191
187
}
192
188
}
193
189
}
You can’t perform that action at this time.
0 commit comments