adjusted something

master
cheetah 1 year ago
parent 5ca50c3d49
commit 01b5a21ebd

@ -389,6 +389,7 @@ func (p *PoolMaster) ScanForLocalPools() (err error) {
return err return err
} }
p.CurrentPool[string(workerBytes)] = restoredPool p.CurrentPool[string(workerBytes)] = restoredPool
fmt.Println(string(workerBytes))
} }
} }
} }
@ -778,7 +779,6 @@ func (p *PoolMaster) FetchLoadWORM(chunkID string, fileID string, writer io.Writ
} }
fmt.Printf("extracted and key = %s\n", loadedWormPool.PoolID) fmt.Printf("extracted and key = %s\n", loadedWormPool.PoolID)
p.WORMPools[loadedWormPool.PoolID] = &loadedWormPool p.WORMPools[loadedWormPool.PoolID] = &loadedWormPool
fmt.Println(p.WORMPools)
return loadedWormPool.Fetch(fileID, writer) return loadedWormPool.Fetch(fileID, writer)
//return nil //return nil
} }
@ -798,7 +798,7 @@ func (p *PoolMaster) CleanWORMTemp() (err error) {
return nil return nil
} }
func (p *PoolMaster) PackFullPools() (err error) { func (p *PoolMaster) PackFullPools() (err error) {
if len(poolMaster.FullPools) > 0 { if len(poolMaster.FullPools) >= 16 {
poolMaster.lock.Lock() poolMaster.lock.Lock()
fmt.Printf("Aquiring WORMLock for Regular FullPool Pack\n") fmt.Printf("Aquiring WORMLock for Regular FullPool Pack\n")
//poolMaster.WORMLock.Lock() //poolMaster.WORMLock.Lock()
@ -807,7 +807,7 @@ func (p *PoolMaster) PackFullPools() (err error) {
var deletedPools []string var deletedPools []string
var poolChannelCounter = 0 var poolChannelCounter = 0
for _, fullPool := range poolMaster.FullPools { for _, fullPool := range poolMaster.FullPools {
if time.Since(fullPool.LastTouchy).Minutes() < 1 { if time.Since(fullPool.LastTouchy).Minutes() < 5 {
continue continue
} }
// start parallel // start parallel

Loading…
Cancel
Save