mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Manager refactor, part 1 (#4298)
* Move BackupDatabase and AnonymiseDatabase to internal/manager * Rename config.Instance to config.Config * Rename FFMPEG * Rework manager and initialization process * Fix Makefile * Tweak phasher * Fix config races * Fix setup error not clearing
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
// should be run with -race
|
||||
func TestConcurrentConfigAccess(t *testing.T) {
|
||||
i := GetInstance()
|
||||
i := InitializeEmpty()
|
||||
|
||||
const workers = 8
|
||||
const loops = 200
|
||||
@@ -16,13 +16,12 @@ func TestConcurrentConfigAccess(t *testing.T) {
|
||||
wg.Add(1)
|
||||
go func(wk int) {
|
||||
for l := 0; l < loops; l++ {
|
||||
if err := i.SetInitialMemoryConfig(); err != nil {
|
||||
if err := i.SetInitialConfig(); err != nil {
|
||||
t.Errorf("Failure setting initial configuration in worker %v iteration %v: %v", wk, l, err)
|
||||
}
|
||||
|
||||
i.HasCredentials()
|
||||
i.ValidateCredentials("", "")
|
||||
i.GetCPUProfilePath()
|
||||
i.GetConfigFile()
|
||||
i.GetConfigPath()
|
||||
i.GetDefaultDatabaseFilePath()
|
||||
|
||||
Reference in New Issue
Block a user