Commit 0ed0c6d6 authored by duanjinfei's avatar duanjinfei

add monitor nm heart time log

parent 49580b19
......@@ -195,7 +195,9 @@ func monitorWorker(op *operate.DockerOp) {
log.Info("------------------------Start rev msg worker thread------------------------")
for {
if time.Now().Sub(nodeManager.GetLastHeartTime()) == time.Duration(conf.GetConfig().HeartRespTimeSecond) {
sub := time.Now().Sub(nodeManager.GetLastHeartTime())
log.WithField("time(uint seconds)", sub).Info("The time difference since the last heartbeat")
if sub == time.Duration(conf.GetConfig().HeartRespTimeSecond) {
if nodeManager.Status {
nodeManager.UpdateStatus(false)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment