| | |
| | | "apsClient/nsq" |
| | | "apsClient/pkg/ecode" |
| | | "apsClient/pkg/logx" |
| | | "apsClient/serf" |
| | | "apsClient/service" |
| | | "fmt" |
| | | "github.com/go-co-op/gocron" |
| | |
| | | s.Every(60).Seconds().Do(SyncProductionProgress) //同步生产数据 |
| | | s.Every(30).Seconds().Do(SyncTaskStatus) //同步任务状态 |
| | | } |
| | | |
| | | s.Every(10).Seconds().Do(QueryClusterStatus) //查询集群节点数量 |
| | | |
| | | s.StartAsync() |
| | | return nil |
| | | } |
| | |
| | | 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 |
| | | } |