update locks

This commit is contained in:
shoopea
2025-10-19 14:12:31 +02:00
parent ace13b68a8
commit 73f9551c8f
6 changed files with 75 additions and 37 deletions

7
app.go
View File

@@ -514,9 +514,6 @@ func (a *App) Boxes() []*Box {
log.WithFields(log.Fields{"app": a.name}).Debugf("starting")
defer log.WithFields(log.Fields{"app": a.name}).Debugf("done")
cfgMx.Lock()
defer cfgMx.Unlock()
bm := make(map[string]struct{})
for _, s := range a.sources {
@@ -552,8 +549,8 @@ func (a *App) RunFull() error {
return fmt.Errorf("backup already running")
}
cfgMx.Lock()
defer cfgMx.Unlock()
CfgLock()
defer CfgUnlock()
cfgRun = true
defer func() { cfgRun = false }()