1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-12 23:36:44 +00:00
This commit is contained in:
2020-04-11 11:42:03 +08:00
parent 11aded3427
commit 6714dd5779

View File

@@ -111,6 +111,8 @@ func (pool *ResourcePool) update(node NodeStatus) {
pool.mu.Lock()
defer pool.mu.Unlock()
pool.heartBeat[node.ClientID] = time.Now()
pool.counterTotal++
if version, ok := pool.versions[node.ClientID]; ok && version == node.Version {
return
@@ -128,7 +130,6 @@ func (pool *ResourcePool) update(node NodeStatus) {
}
}
pool.nodes[node.ClientID] = node
pool.heartBeat[node.ClientID] = time.Now()
pool.versions[node.ClientID] = node.Version
log.Debug(pool.nodes)
}