浏览代码

no message

zhangchuanxing 3 月之前
父节点
当前提交
39852d78d9
共有 3 个文件被更改,包括 19 次插入3 次删除
  1. 14 0
      services/industrial_management.go
  2. 4 3
      services/task.go
  3. 1 0
      utils/constants.go

+ 14 - 0
services/industrial_management.go

@@ -1229,6 +1229,20 @@ func extractTextBeforePeriodOrNewline(htmlContent string) (string, error) {
 	}
 }
 
+// 处理产业管理时间线相关内容的数据
+func UpdateIndustrialManagementTimeLineDateList3ByRedis() (err error) {
+	for {
+		utils.Rc.Brpop(utils.CYGX_ARTICLE_TIME_LINE_KEY, func(b []byte) {
+			var log models.IndustrialManagementCount
+			if err := json.Unmarshal(b, &log); err != nil {
+				fmt.Println("json unmarshal wrong!")
+				go utils.SendAlarmMsg("处理产业管理时间线相关内容的数据处理Redis队列消息失败: UpdateIndustrialManagementTimeLineDateList3ByRedis "+err.Error()+string(b), 2)
+			}
+			IndustrialManagementTimeLineDateList3(log.IndustrialManagementId)
+		})
+	}
+}
+
 //func init_14_2() {
 //SELECT  * FROM cygx_resource_data WHERE  source_id  IN (SELECT article_id  FROM   cygx_article WHERE series_name IN ('行业深度','季度策略') )   AND source = 'article'
 //}

+ 4 - 3
services/task.go

@@ -178,9 +178,10 @@ func Task() {
 	//	task.AddTask("getArticleListByApi", getArticleListByApi)
 	//}
 
-	go UserLabelLogReduce()              // 处理用户标签的队列消息
-	go YanXuanActivityPointsBillReduce() // 处理研选活动扣点
-	go UpdateArticleByRedis()            // 处理策略平台同步过来的文章
+	go UserLabelLogReduce()                                 // 处理用户标签的队列消息
+	go YanXuanActivityPointsBillReduce()                    // 处理研选活动扣点
+	go UpdateArticleByRedis()                               // 处理策略平台同步过来的文章
+	go UpdateIndustrialManagementTimeLineDateList3ByRedis() // 处理产业管理时间线相关内容的数据
 
 	//GetCygxActivityAttendanceDetail()
 	//CreateIndexNameArticleHistory()

+ 1 - 0
utils/constants.go

@@ -136,6 +136,7 @@ const (
 	CYGX_USER_KEY_LABEL              = "CYGX_USER_KEY_LABEL"              //查研观向用户标签
 	CYGX_YANXUAN_POINTS_KEY          = "CYGX_YANXUAN_POINTS_KEY"          //查研观向研选活动扣点KEY
 	CYGX_ARTICLE_UPDATE_KEY          = "CYGX_ARTICLE_UPDATE_KEY"          //策略平台更新文章key
+	CYGX_ARTICLE_TIME_LINE_KEY       = "CYGX_ARTICLE_TIME_LINE_KEY"       //产业时间线关联的文章key
 	//CYGX_RAI_SERVE_BILL_KEY          = "CYGX_RAI_SERVE_BILL_KEY"          //权益服务记录明细key
 )