Преглед на файлове

fe环境关闭定时任务

lichangdong преди 2 дни
родител
ревизия
243b35698b
променени са 1 файла, в които са добавени 30 реда и са изтрити 29 реда
  1. 30 29
      crontask/init.go

+ 30 - 29
crontask/init.go

@@ -24,35 +24,36 @@ func NewCronTask(ctx context.Context, svcCtx *svc.ServiceContext) *CronTask {
 
 func ScheduleRun(c *cron.Cron, serverCtx *svc.ServiceContext) {
 
-	l := NewCronTask(context.Background(), serverCtx)
-	c.AddFunc("* * * * *", func() {
-		l.sendMsg()
-	})
-
-	sendWx := NewCronTask(context.Background(), serverCtx)
-	c.AddFunc("* * * * *", func() {
-		sendWx.sendWx()
-	})
-
-	sendWxOnTimeout := NewCronTask(context.Background(), serverCtx)
-	c.AddFunc("* * * * *", func() {
-		sendWxOnTimeout.sendWxOnTimeout()
-	})
-
-	computeStatistic := NewCronTask(context.Background(), serverCtx)
-	c.AddFunc("0 * * * *", func() {
-		computeStatistic.computeStatistic()
-	})
-
-	contactForm := NewCronTask(context.Background(), serverCtx)
-	c.AddFunc("10 0 * * *", func() {
-		contactForm.analyze()
-	})
-
-	l = NewCronTask(context.Background(), serverCtx)
-	c.AddFunc("*/30 * * * *", func() {
-		l.wxAddFriend()
-	})
+	//关闭任务
+	//l := NewCronTask(context.Background(), serverCtx)
+	//c.AddFunc("* * * * *", func() {
+	//	l.sendMsg()
+	//})
+	//
+	//sendWx := NewCronTask(context.Background(), serverCtx)
+	//c.AddFunc("* * * * *", func() {
+	//	sendWx.sendWx()
+	//})
+	//
+	//sendWxOnTimeout := NewCronTask(context.Background(), serverCtx)
+	//c.AddFunc("* * * * *", func() {
+	//	sendWxOnTimeout.sendWxOnTimeout()
+	//})
+	//
+	//computeStatistic := NewCronTask(context.Background(), serverCtx)
+	//c.AddFunc("0 * * * *", func() {
+	//	computeStatistic.computeStatistic()
+	//})
+	//
+	//contactForm := NewCronTask(context.Background(), serverCtx)
+	//c.AddFunc("10 0 * * *", func() {
+	//	contactForm.analyze()
+	//})
+	//
+	//l = NewCronTask(context.Background(), serverCtx)
+	//c.AddFunc("*/30 * * * *", func() {
+	//	l.wxAddFriend()
+	//})
 
 	//l = NewCronTask(context.Background(), serverCtx)
 	//c.AddFunc("* * * * *", func() {