1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-15 08:16:43 +00:00
This commit is contained in:
2020-05-27 14:15:43 +08:00
parent ab0c1882cc
commit 5d8693eb5b
3 changed files with 7 additions and 12 deletions

View File

@@ -896,7 +896,12 @@ func (pool *ResourcePool) releaseResource(job Job, agent NodeStatus) {
seg.Lock.Lock()
defer seg.Lock.Unlock()
node := seg.Nodes[agent.ClientID]
node, ok := seg.Nodes[agent.ClientID]
if !ok {
/* in case node is offline */
/* TODO, update usingTotalGPU correctly */
return
}
for _, gpu := range agent.Status {
for j := range node.Status {
if gpu.UUID == node.Status[j].UUID {