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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user