Browse Source

no message

xingzai 2 years ago
parent
commit
e1c6c8ebec
2 changed files with 2 additions and 3 deletions
  1. 1 2
      services/chart.go
  2. 1 1
      services/task.go

+ 1 - 2
services/chart.go

@@ -406,7 +406,6 @@ func GetChartDetailByChartId(cont context.Context) (err error) {
 		return err
 	}
 	for _, v := range listUpdate {
-		// 这里直接go出去会出现并发,导致文章md5ID唯一索引限制报错
 		err = GetChartDetailByApi(v.ChartId)
 		if err != nil {
 			go utils.SendAlarmMsg("发送邮件:同步用户到策略平台信息失败,图表ID:"+strconv.Itoa(v.ChartId)+err.Error(), 2)
@@ -518,7 +517,7 @@ func GetChartDetailByApi(chartId int) (err error) {
 		if err != nil {
 			return err
 		}
-		if item.PublishStatus == 1 && v.IsActive {
+		if item.PublishStatus == 0 {
 			go UpdateResourceData(item.ChartId, "newchart", "delete", time.Now().Format(utils.FormatDateTime))
 		}
 	}

+ 1 - 1
services/task.go

@@ -38,7 +38,7 @@ func Task() {
 		dotongbuShangHaiSendEmail := task.NewTask("dotongbuShangHaiSendEmail", "0 00 4 * * *", DotongbuShangHaiSendEmail) //发送上海策略品台同步结果名单的邮件附件
 		task.AddTask("发送上海策略品台同步结果名单的邮件附件", dotongbuShangHaiSendEmail)
 
-		getChartListByApi := task.NewTask("getChartListByApi", "0 */30 * * * *", GetChartListByApi) //同步图表
+		getChartListByApi := task.NewTask("getChartListByApi", "0 */10 * * * *", GetChartDetailByChartId) //同步图表
 		task.AddTask("getChartListByApi", getChartListByApi)
 
 		getYiDongActivity := task.NewTask("getYiDongActivity", "0 */10 * * * *", GetYiDongActivity) //同步易董的活动信息