fix: address second code review findings
- Add context cancellation check between pagination pages in GetArtistReleaseGroups for responsive graceful shutdown during large discography fetches. - Eliminate double DB query on cache hit by having GetCachedReleases return []ExternalRelease directly instead of just a count, avoiding a redundant second query in SyncArtistDiscography. - Update cache_test.go to match new GetCachedReleases return type. - Format main.go (pre-existing whitespace issue).
This commit is contained in:
@@ -16,9 +16,9 @@ import (
|
||||
|
||||
// App holds all application dependencies for clean shutdown and testability.
|
||||
type App struct {
|
||||
cfg *config.Config
|
||||
db *database.DB
|
||||
mbClient *musicbrainz.MusicBrainzClient
|
||||
cfg *config.Config
|
||||
db *database.DB
|
||||
mbClient *musicbrainz.MusicBrainzClient
|
||||
}
|
||||
|
||||
const defaultConfigPath = "config.yaml"
|
||||
|
||||
Reference in New Issue
Block a user