1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-13 07:46:43 +00:00

add keep alive support

This commit is contained in:
2019-06-04 11:12:02 +08:00
parent 926fb144f2
commit fda4a7674b

View File

@@ -16,6 +16,7 @@ type ResourcePool struct {
func (pool *ResourcePool) start() {
/* check dead nodes */
pool.heartBeat = map[string]time.Time{}
for k, v := range pool.heartBeat {
if v.Add(time.Second * 30).Before(time.Now()) {
delete(pool.nodes, k)