From 2d6875c93b25d0b7336c7fa11e066d213259fe2e Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期四, 25 四月 2024 10:02:01 +0800
Subject: [PATCH] 更改定时任务时区设置

---
 crontask/cron_task.go |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/crontask/cron_task.go b/crontask/cron_task.go
index 4cdc34c..7f559d8 100644
--- a/crontask/cron_task.go
+++ b/crontask/cron_task.go
@@ -20,7 +20,7 @@
 var s *gocron.Scheduler
 
 func init() {
-	s = gocron.NewScheduler(time.UTC)
+	s = gocron.NewScheduler(time.Local)
 }
 func StartTask(isMaster bool) error {
 	finishNumberTimeInterval := conf.Conf.PLC.FinishNumberTimeInterval
@@ -91,6 +91,9 @@
 		return
 	}
 	for _, progress := range progressList {
+		if progress.FinishedQuantity == 0 {
+			continue
+		}
 		caller := nsq.NewCaller(fmt.Sprintf(constvar.NsqTopicSyncTaskProgress, conf.Conf.NsqConf.NodeId), "")
 		err = caller.Send(progress)
 		if err != nil {

--
Gitblit v1.8.0