From f2d80dbaa80a1283bf1c0fe9ae1d280832652d7f Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期四, 02 十一月 2023 18:14:22 +0800 Subject: [PATCH] 增加问题诊断定时任务和查询接口,增加按channel查询工序开始和结束时间 --- crontask/cron_task.go | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/crontask/cron_task.go b/crontask/cron_task.go index 66ddf9b..42dc94b 100644 --- a/crontask/cron_task.go +++ b/crontask/cron_task.go @@ -9,6 +9,7 @@ "apsClient/pkg/logx" "apsClient/serf" "apsClient/service" + "apsClient/service/problem" "fmt" "github.com/go-co-op/gocron" "github.com/spf13/cast" @@ -82,6 +83,7 @@ } s.Every(10).Seconds().Do(QueryClusterStatus) //鏌ヨ闆嗙兢鑺傜偣鏁伴噺 + s.Every(30).Seconds().Do(ProblemCheck) //闂璇婃柇 s.StartAsync() return nil @@ -162,3 +164,7 @@ conf.Conf.SerfClusterStatus = clusterStatus conf.Conf.ClusterNodeQuantity = nodeQuantity } + +func ProblemCheck() { + problem.Check() +} -- Gitblit v1.8.0