Skip to content

Commit

Permalink
fix(executor): Ignore not existing metadata. Fixes #5656 (#5695)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexec committed Apr 19, 2021
1 parent e93ee4f commit 9a872de
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions workflow/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -942,14 +942,17 @@ func watchFileChanges(ctx context.Context, pollInterval time.Duration, filePath
}

file, err := os.Stat(filePath)
if err != nil {
if os.IsNotExist(err) {
// noop
} else if err != nil {
log.Fatal(err)
} else {
newModTime := file.ModTime()
if modTime != nil && !modTime.Equal(file.ModTime()) {
res <- struct{}{}
}
modTime = &newModTime
}
newModTime := file.ModTime()
if modTime != nil && !modTime.Equal(file.ModTime()) {
res <- struct{}{}
}
modTime = &newModTime
time.Sleep(pollInterval)
}
}()
Expand Down

0 comments on commit 9a872de

Please sign in to comment.