1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-13 07:46:43 +00:00
This commit is contained in:
2020-05-04 00:19:50 +08:00
parent dbe02d12ee
commit 488dfbbb2f

View File

@@ -14,7 +14,7 @@ import (
type ResourcePool struct {
poolsCount int
//pools []PoolSeg
pools []PoolSeg
poolsMu sync.Mutex
history []PoolStatus
@@ -83,6 +83,19 @@ func (pool *ResourcePool) start() {
go func() {
pool.saveStatusHistory()
}()
segID := rand.Intn(pool.poolsCount)
start := &pool.pools[segID]
if start.Nodes == nil {
start = start.Next
}
for cur := start; ; {
log.Info(cur.ID)
cur = cur.Next
if cur.ID == start.ID {
break
}
}
}
/* check dead nodes periodically */