|
|
|
@ -797,7 +797,7 @@ func (p *PoolMaster) CleanWORMTemp() (err error) {
|
|
|
|
|
if time.Since(wormPool.LastTouchy).Minutes() > 4 {
|
|
|
|
|
wormPool.Unload()
|
|
|
|
|
delete(p.WORMPools, wormPool.PoolID)
|
|
|
|
|
os.RemoveAll(filepath.Join(poolMaster.cachePath, "worm", wormPool.PoolID))
|
|
|
|
|
//os.RemoveAll(filepath.Join(poolMaster.cachePath, "worm", wormPool.PoolID))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
@ -990,7 +990,6 @@ func (p *PoolMaster) Fetch(id string, writer io.Writer) (err error) {
|
|
|
|
|
}
|
|
|
|
|
// fastCachePool
|
|
|
|
|
p.WORMPools[fastCachePool.PoolID] = fastCachePool
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
@ -1096,7 +1095,7 @@ func main() {
|
|
|
|
|
go func() {
|
|
|
|
|
for {
|
|
|
|
|
poolMaster.PackFullPools()
|
|
|
|
|
//poolMaster.CleanWORMTemp()
|
|
|
|
|
poolMaster.CleanWORMTemp()
|
|
|
|
|
time.Sleep(time.Minute * 2)
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|