From 1ced402ce04efcafab8203c8b54931564e88fe90 Mon Sep 17 00:00:00 2001 From: cheetah Date: Sat, 16 Sep 2023 16:01:12 +0200 Subject: [PATCH] improved pre-caching unloading --- storageserver/storageserver.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/storageserver/storageserver.go b/storageserver/storageserver.go index ab07b12..50c6deb 100644 --- a/storageserver/storageserver.go +++ b/storageserver/storageserver.go @@ -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) } }()