mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-15 08:16:43 +00:00
update
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
|||||||
|
|
||||||
type ResourcePool struct {
|
type ResourcePool struct {
|
||||||
poolsCount int
|
poolsCount int
|
||||||
//pools []PoolSeg
|
pools []PoolSeg
|
||||||
poolsMu sync.Mutex
|
poolsMu sync.Mutex
|
||||||
|
|
||||||
history []PoolStatus
|
history []PoolStatus
|
||||||
@@ -83,6 +83,19 @@ func (pool *ResourcePool) start() {
|
|||||||
go func() {
|
go func() {
|
||||||
pool.saveStatusHistory()
|
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 */
|
/* check dead nodes periodically */
|
||||||
|
|||||||
Reference in New Issue
Block a user