fix: address code review findings

This commit is contained in:
2026-07-19 19:07:20 +03:00
parent a4c426f640
commit c70f46af27
10 changed files with 77 additions and 124 deletions

View File

@@ -2,6 +2,7 @@ package scanner
import (
"context"
"log"
"naviwatcher/internal/database"
)
@@ -55,9 +56,12 @@ func ScanAll(ctx context.Context, db *database.DB, threshold float64) ([]Missing
if !s.Monitored {
continue
}
// A transient error for one artist must not abort the whole scan and
// take down the daemon; log it and continue with the remaining artists.
missing, err := ScanArtist(ctx, db, s.ID, resolved)
if err != nil {
return all, err
log.Printf("scan artist %s failed: %v", s.ID, err)
continue
}
all = append(all, missing...)
}