فهرست منبع

Merge branch 'feature/deepseek_rag_2.0' of http://8.136.199.33:3000/eta_server/eta_api into feature/deepseek_rag_2.0

kobe6258 5 روز پیش
والد
کامیت
5fa244055c
1فایلهای تغییر یافته به همراه7 افزوده شده و 1 حذف شده
  1. 7 1
      services/wechat_platform.go

+ 7 - 1
services/wechat_platform.go

@@ -226,8 +226,14 @@ func BeachAddWechatArticle(item *rag.WechatPlatform, num int) {
 		// 把刚搜索的文章加入到指标库
 		AddWechatArticle(item, articleMenu.Link, articleDetail, &articleMenu)
 
-		time.Sleep(10 * time.Second)
+		//time.Sleep(10 * time.Second)
 
+		// 随机休眠,至少大于10s
+		sleepTimeInt := utils.GetRandInt(10, 20)
+		if sleepTimeInt < 10 {
+			sleepTimeInt = 10
+		}
+		time.Sleep(time.Duration(sleepTimeInt) * time.Second)
 	}
 	return
 }