Immediate cleanup to prevent inconsistencies
This commit is contained in:
@@ -91,8 +91,12 @@ func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, r
|
||||
t.initializeDirectoryMaps()
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(2)
|
||||
wg.Add(3)
|
||||
|
||||
t.workerPool.Submit(func() {
|
||||
defer wg.Done()
|
||||
t.loadDumpedTorrents()
|
||||
})
|
||||
t.workerPool.Submit(func() {
|
||||
defer wg.Done()
|
||||
|
||||
@@ -417,8 +421,10 @@ func (t *TorrentManager) StartDumpJob() {
|
||||
select {
|
||||
case <-dumpTicker.C:
|
||||
t.dumpTorrents()
|
||||
t.loadDumpedTorrents()
|
||||
case <-t.DumpTrigger:
|
||||
t.dumpTorrents()
|
||||
t.loadDumpedTorrents()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user