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