test: add test data directories (testMusic and testCharacters)

This commit is contained in:
2026-05-23 01:06:43 +02:00
parent 92b82da3af
commit 1ada52f5f8
244 changed files with 1225 additions and 26 deletions
+3 -3
View File
@@ -217,7 +217,7 @@ func syncGamesNew(full bool) {
logging.GetLogger().Fatal("Failed to read music directory", zap.String("path", musicPath), zap.String("error", err.Error()))
}
pool, _ := ants.NewPool(50, ants.WithPreAlloc(true))
pool, _ := ants.NewPool(10, ants.WithPreAlloc(true))
defer pool.Release()
foldersSynced = 0
@@ -247,7 +247,7 @@ func checkBrokenSongsNew() {
allSongs, err := repo.FetchAllSongs(db.Ctx)
handleError("FetchAllSongs", err, "")
var brokenWg sync.WaitGroup
poolBroken, _ := ants.NewPool(50, ants.WithPreAlloc(true))
poolBroken, _ := ants.NewPool(200, ants.WithPreAlloc(true))
defer poolBroken.Release()
brokenWg.Add(len(allSongs))
@@ -432,7 +432,7 @@ func newCheckSongs(entries []os.DirEntry, gameDir string, id int32) int32 {
numberOfFiles := len(entries)
var songWg sync.WaitGroup
poolSong, _ := ants.NewPool(numberOfFiles, ants.WithPreAlloc(true))
poolSong, _ := ants.NewPool(10, ants.WithPreAlloc(true))
defer poolSong.Release()
songWg.Add(numberOfFiles)