Skip to content

Commit

Permalink
DATA-2651 Change error to warning log (viamrobotics#3992)
Browse files Browse the repository at this point in the history
  • Loading branch information
vijayvuyyuru authored May 23, 2024
1 parent c12cd83 commit bd673fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion services/datamanager/builtin/builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ func pollFilesystem(ctx context.Context, wg *sync.WaitGroup, captureDir string,
logger.Debug("checking disk usage")
shouldDelete, err := shouldDeleteBasedOnDiskUsage(ctx, captureDir, logger)
if err != nil {
logger.Errorw("error checking file system stats", "error", err)
logger.Warnw("error checking file system stats", "error", err)
}
if shouldDelete {
start := time.Now()
Expand Down
3 changes: 3 additions & 0 deletions services/datamanager/builtin/file_deletion.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ func exceedsDeletionThreshold(ctx context.Context, captureDirPath string, fsSize
if !d.IsDir() {
fileInfo, err := d.Info()
if err != nil {
if errors.Is(err, fs.ErrNotExist) {
return nil
}
return err
}
dirSize += fileInfo.Size()
Expand Down

0 comments on commit bd673fd

Please sign in to comment.