crontask/cron_task.go
@@ -7,7 +7,9 @@
   "apsClient/nsq"
   "apsClient/pkg/ecode"
   "apsClient/pkg/logx"
   "apsClient/serf"
   "apsClient/service"
   "apsClient/service/problem"
   "fmt"
   "github.com/go-co-op/gocron"
   "github.com/spf13/cast"
@@ -79,6 +81,10 @@
      s.Every(60).Seconds().Do(SyncProductionProgress) //同步生产数据
      s.Every(30).Seconds().Do(SyncTaskStatus)         //同步任务状态
   }
   s.Every(10).Seconds().Do(QueryClusterStatus) //查询集群节点数量
   s.Every(30).Seconds().Do(ProblemCheck)       //问题诊断
   s.StartAsync()
   return nil
}
@@ -152,3 +158,13 @@
      logx.Errorf("send pull data msg error:%v, msg:%+v", err.Error(), msg)
   }
}
func QueryClusterStatus() {
   clusterStatus, nodeQuantity := serf.QueryClusterStatusAndNodeQuantity()
   conf.Conf.SerfClusterStatus = clusterStatus
   conf.Conf.ClusterNodeQuantity = nodeQuantity
}
func ProblemCheck() {
   problem.Check()
}