Skip to content

Commit

Permalink
Remove useless workqueue.Done
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Savian <vitor.savian@suse.com>
  • Loading branch information
vitorsavian committed Nov 26, 2024
1 parent d016f6f commit df13c2f
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions pkg/agent/containerd/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,10 @@ func (w *Watcher) processImageEvent(ctx context.Context, key string, cfg *config

// we do not want to handle directorys, only files
if newStateFile.IsDir() {
w.workqueue.Done(key)
return nil
}

if !isFileSupported(event.Name) {
w.workqueue.Done(key)
return nil
}

Expand All @@ -175,8 +173,6 @@ func (w *Watcher) processImageEvent(ctx context.Context, key string, cfg *config
}
logrus.Infof("Imported images from %s in %s", event.Name, time.Since(start))
}

w.workqueue.Done(key)
}

if event.Has(fsnotify.Create) {
Expand Down Expand Up @@ -222,12 +218,10 @@ func (w *Watcher) processImageEvent(ctx context.Context, key string, cfg *config
}
}

w.workqueue.Done(key)
return nil
}

if !isFileSupported(event.Name) {
w.workqueue.Done(key)
return nil
}

Expand All @@ -239,7 +233,6 @@ func (w *Watcher) processImageEvent(ctx context.Context, key string, cfg *config
return err
}
logrus.Infof("Imported images from %s in %s", event.Name, time.Since(start))
w.workqueue.Done(key)
}

if event.Has(fsnotify.Remove) {
Expand All @@ -251,7 +244,6 @@ func (w *Watcher) processImageEvent(ctx context.Context, key string, cfg *config
}

if !isFileSupported(event.Name) {
w.workqueue.Done(key)
return nil
}

Expand All @@ -269,7 +261,6 @@ func (w *Watcher) processImageEvent(ctx context.Context, key string, cfg *config
}

if !isFileSupported(event.Name) {
w.workqueue.Done(key)
return nil
}

Expand Down

0 comments on commit df13c2f

Please sign in to comment.