mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-03 20:47:35 +03:00
Cache Warmer now waits for Cache to be available
This commit is contained in:
parent
145a5708ca
commit
58d6b0a84f
7 changed files with 42 additions and 20 deletions
|
@ -52,7 +52,7 @@ func createScanner() scanner.Scanner {
|
|||
dataStore := persistence.New()
|
||||
artworkCache := core.GetImageCache()
|
||||
artwork := core.NewArtwork(dataStore, artworkCache)
|
||||
cacheWarmer := core.NewCacheWarmer(artwork)
|
||||
cacheWarmer := core.NewCacheWarmer(artwork, artworkCache)
|
||||
scannerScanner := scanner.New(dataStore, cacheWarmer)
|
||||
return scannerScanner
|
||||
}
|
||||
|
@ -61,6 +61,7 @@ func createScanner() scanner.Scanner {
|
|||
|
||||
var allProviders = wire.NewSet(core.Set, subsonic.New, app.New, persistence.New)
|
||||
|
||||
// Scanner must be a Singleton
|
||||
var (
|
||||
onceScanner sync.Once
|
||||
scannerInstance scanner.Scanner
|
||||
|
|
|
@ -10,6 +10,7 @@ import (
|
|||
"github.com/deluan/navidrome/server/app"
|
||||
"github.com/deluan/navidrome/server/subsonic"
|
||||
"github.com/google/wire"
|
||||
"sync"
|
||||
)
|
||||
|
||||
var allProviders = wire.NewSet(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue