Fixed golangci-lint issues: /fission/pkg (#1902)
This commit is contained in:
@@ -111,13 +111,13 @@ func (kw *KubeWatcher) svc() {
|
||||
// Remove old watches
|
||||
for uid, ws := range kw.watches {
|
||||
if _, ok := newWatchUids[uid]; !ok {
|
||||
kw.removeWatch(&ws.watch)
|
||||
kw.removeWatch(&ws.watch) //nolint: errCheck
|
||||
}
|
||||
}
|
||||
// Add new watches
|
||||
for _, w := range req.watches {
|
||||
if _, ok := kw.watches[w.ObjectMeta.UID]; !ok {
|
||||
kw.addWatch(&w)
|
||||
kw.addWatch(&w) //nolint: errCheck
|
||||
}
|
||||
}
|
||||
req.responseChannel <- &kubeWatcherResponse{error: nil}
|
||||
|
||||
@@ -51,7 +51,10 @@ func (ws *WatchSync) syncSvc() {
|
||||
ws.logger.Fatal("failed to get Kubernetes watch trigger list", zap.Error(err))
|
||||
}
|
||||
|
||||
ws.kubeWatcher.Sync(watches.Items)
|
||||
err = ws.kubeWatcher.Sync(watches.Items)
|
||||
if err != nil {
|
||||
ws.logger.Fatal("failed to sync watches", zap.Error(err))
|
||||
}
|
||||
time.Sleep(3 * time.Second)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user