fix: address code review findings
This commit is contained in:
@@ -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...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user