mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-15 08:16:43 +00:00
support stop
This commit is contained in:
@@ -2,12 +2,12 @@ package main
|
||||
|
||||
import (
|
||||
"sync"
|
||||
)
|
||||
)
|
||||
|
||||
type ResourcePool struct {
|
||||
mu sync.Mutex
|
||||
|
||||
nodes map[int]NodeStatus
|
||||
nodes map[string]NodeStatus
|
||||
}
|
||||
|
||||
func (pool *ResourcePool) update(node NodeStatus) {
|
||||
@@ -27,7 +27,7 @@ func (pool *ResourcePool) update(node NodeStatus) {
|
||||
//log.Println(pool.nodes)
|
||||
}
|
||||
|
||||
func (pool *ResourcePool) getByID(id int) NodeStatus {
|
||||
func (pool *ResourcePool) getByID(id string) NodeStatus {
|
||||
pool.mu.Lock()
|
||||
defer pool.mu.Unlock()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user