From 7c1d1372e6ef8febe83c81675b914d7ea84837d2 Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Thu, 27 Apr 2023 15:01:35 +0800 Subject: [PATCH] =?UTF-8?q?pcm-core=E4=BB=BB=E5=8A=A1=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adaptor/PCM-CORE/rpc/internal/logic/cronlogic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adaptor/PCM-CORE/rpc/internal/logic/cronlogic.go b/adaptor/PCM-CORE/rpc/internal/logic/cronlogic.go index 89ce4a9b..c7e8bef6 100644 --- a/adaptor/PCM-CORE/rpc/internal/logic/cronlogic.go +++ b/adaptor/PCM-CORE/rpc/internal/logic/cronlogic.go @@ -12,7 +12,7 @@ func InitCron(svc *svc.ServiceContext) { svc.Cron.Start() svc.Cron.AddFunc("*/5 * * * * ?", func() { var tasks []model.Task - svc.DbEngin.Find(&tasks) + svc.DbEngin.Not("status = ?", "Completed").Find(&tasks) for _, task := range tasks { var allStatus string tx := svc.DbEngin.Raw("SELECT CONCAT_WS(',',GROUP_CONCAT(DISTINCT h.status) ,GROUP_CONCAT(DISTINCT a.status) ,GROUP_CONCAT(DISTINCT c.status))as status from task t left join hpc h on t.id = h.task_id left join cloud c on t.id = c.task_id left join ai a on t.id = a.task_id where t.id = ?", task.Id).Scan(&allStatus)