change the worker heartbeat ttl from 60s to 2s

This commit is contained in:
zhongyehong 2016-09-12 15:01:50 +08:00
parent 947eea0482
commit 316f6bb864
1 changed files with 1 additions and 1 deletions

View File

@ -182,7 +182,7 @@ class Worker(object):
if status:
# master has know the worker so we start send heartbeat package
if value=='ok':
self.etcd.setkey("machines/runnodes/"+self.addr, "ok", ttl = 60)
self.etcd.setkey("machines/runnodes/"+self.addr, "ok", ttl = 2)
else:
logger.error("get key %s failed, master crashed or initialized. restart worker please." % self.addr)
sys.exit(1)