diff --git a/internal/fs_storage.go b/internal/fs_storage.go index f7f27c0..d95787d 100644 --- a/internal/fs_storage.go +++ b/internal/fs_storage.go @@ -52,6 +52,7 @@ func (fs *FileSystemStorage) WriteFile(path string, file io.ReadCloser) error { // RemoveUnusedArtifacts cleans away artifacts that have not been used for configurable amount of time func (fs *FileSystemStorage) RemoveUnusedArtifacts(ctrl *FileController) { + logrus.Info("starting removal of unused artifacts") cacheTime := fs.config.CacheTime maxAccessTime := time.Now().Add(-cacheTime) var err error @@ -70,6 +71,7 @@ func (fs *FileSystemStorage) RemoveUnusedArtifacts(ctrl *FileController) { } aTime := atime.Get(info) if aTime.Before(maxAccessTime) { + logrus.Debugf("removing %s that has not been accessed since %s", path, aTime) err := os.RemoveAll(path) if err != nil { return err