Skip to content

Commit

Permalink
Add fsnotify create (#1204)
Browse files Browse the repository at this point in the history
  • Loading branch information
thom-at-redhat authored Oct 31, 2024
1 parent 9acd1c0 commit 5538db6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/workceptor/workunitbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,9 @@ loop:
case <-bwu.ctx.Done():
break loop
case event := <-watcherEvents:
if event.Op&fsnotify.Write == fsnotify.Write {
if event.Has(fsnotify.Create) {
bwu.w.nc.GetLogger().Debug("Watcher Event create of %s", statusFile)
} else if event.Op&fsnotify.Write == fsnotify.Write {
err = bwu.Load()
if err != nil {
bwu.w.nc.GetLogger().Error("Watcher Events Error reading %s: %s", statusFile, err)
Expand Down

0 comments on commit 5538db6

Please sign in to comment.