浏览代码

fix:公众号文章定时任务暂时关闭

Roc 1 天之前
父节点
当前提交
b9223c2578
共有 1 个文件被更改,包括 12 次插入14 次删除
  1. 12 14
      services/wechat_platform.go

+ 12 - 14
services/wechat_platform.go

@@ -2,10 +2,8 @@ package services
 
 import (
 	"context"
-	"eta/eta_task/models/rag"
 	"eta/eta_task/utils"
 	"fmt"
-	"time"
 )
 
 type WechatArticleOp struct {
@@ -41,18 +39,18 @@ func AddWechatArticleOpToCache(wechatPlatformId int, source string) bool {
 // @param cont context.Context
 // @return err error
 func RefreshWechatPlatform(cont context.Context) (err error) {
-	utils.FileLog.Debug("RefreshWechatPlatform:", time.Now().Format(utils.FormatDateTime))
-	obj := new(rag.WechatPlatform)
-	platformList, tmpErr := obj.GetListByCondition(` AND enabled = 1 `, []interface{}{}, 0, 100000)
-	if tmpErr != nil {
-		err = tmpErr
-		return
-	}
-
-	for _, v := range platformList {
-		//AddWechatArticleOpToCache(v.WechatPlatformId, "refresh")
-		//time.Sleep(1 * time.Minute)
-	}
+	//utils.FileLog.Debug("RefreshWechatPlatform:", time.Now().Format(utils.FormatDateTime))
+	//obj := new(rag.WechatPlatform)
+	//platformList, tmpErr := obj.GetListByCondition(` AND enabled = 1 `, []interface{}{}, 0, 100000)
+	//if tmpErr != nil {
+	//	err = tmpErr
+	//	return
+	//}
+	//
+	//for _, v := range platformList {
+	//	AddWechatArticleOpToCache(v.WechatPlatformId, "refresh")
+	//	time.Sleep(1 * time.Minute)
+	//}
 
 	return
 }