Also demote useless thumbnailer warnings

Signed-off-by: Neil Alexander <git@neilalexander.dev>
This commit is contained in:
Neil Alexander 2025-01-28 11:13:55 +00:00
parent eb77983ea3
commit b41235521a
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
3 changed files with 5 additions and 5 deletions

View file

@ -86,7 +86,7 @@ func getActiveThumbnailGeneration(dst types.Path, _ types.ThumbnailSize, activeT
activeThumbnailGeneration.Lock()
defer activeThumbnailGeneration.Unlock()
if activeThumbnailGenerationResult, ok := activeThumbnailGeneration.PathToResult[string(dst)]; ok {
logger.Info("Waiting for another goroutine to generate the thumbnail.")
logger.Debugf("Waiting for another goroutine to generate the thumbnail %q", dst)
// NOTE: Wait unlocks and locks again internally. There is still a deferred Unlock() that will unlock this.
activeThumbnailGenerationResult.Cond.Wait()
@ -115,7 +115,7 @@ func broadcastGeneration(dst types.Path, activeThumbnailGeneration *types.Active
activeThumbnailGeneration.Lock()
defer activeThumbnailGeneration.Unlock()
if activeThumbnailGenerationResult, ok := activeThumbnailGeneration.PathToResult[string(dst)]; ok {
logger.Info("Signalling other goroutines waiting for this goroutine to generate the thumbnail.")
logger.Debugf("Signalling other goroutines waiting for this goroutine to generate the thumbnail %q", dst)
// Note: errorReturn is a named return value error that is signalled from here to waiting goroutines
activeThumbnailGenerationResult.Err = errorReturn
activeThumbnailGenerationResult.Cond.Broadcast()
@ -136,7 +136,7 @@ func isThumbnailExists(
config.Width, config.Height, config.ResizeMethod,
)
if err != nil {
logger.Error("Failed to query database for thumbnail.")
logger.Errorf("Failed to query database for thumbnail %q", dst)
return false, err
}
if thumbnailMetadata != nil {

View file

@ -153,7 +153,7 @@ func createThumbnail(
"ActualWidth": width,
"ActualHeight": height,
"processTime": time.Now().Sub(start),
}).Info("Generated thumbnail")
}).Debugf("Generated thumbnail %q", dst)
stat, err := os.Stat(string(dst))
if err != nil {

View file

@ -191,7 +191,7 @@ func createThumbnail(
"ActualWidth": width,
"ActualHeight": height,
"processTime": time.Since(start),
}).Info("Generated thumbnail")
}).Debugf("Generated thumbnail %q", dst)
stat, err := os.Stat(string(dst))
if err != nil {