Browse Source

feat:指标刷新逻辑调整,根据配置来走

Roc 1 year ago
parent
commit
f98eecc528
1 changed files with 10 additions and 9 deletions
  1. 10 9
      services/edb_refresh.go

+ 10 - 9
services/edb_refresh.go

@@ -4,6 +4,7 @@ import (
 	"context"
 	"eta/eta_task/models/data_manage/edb_refresh"
 	"eta/eta_task/services/alarm_msg"
+	"eta/eta_task/services/data"
 	"eta/eta_task/utils"
 	"fmt"
 	"strings"
@@ -326,15 +327,15 @@ func BaseRefreshData(wg *sync.WaitGroup, source, subSource int, items []*edb_ref
 		fmt.Println(startDate)
 
 		// 数据更新
-		//resp, tmpErr := data.RefreshEdbData(v.EdbInfoId, v.Source, v.SubSource, v.EdbCode, startDate)
-		//if tmpErr != nil {
-		//	errMsgList = append(errMsgList, v.EdbCode+"RefreshEdbData Err:"+tmpErr.Error())
-		//	continue
-		//}
-		//if resp.Ret != 200 {
-		//	errMsgList = append(errMsgList, v.EdbCode+";RefreshEdbData Err:"+resp.Msg+";ErrMsg:"+resp.ErrMsg)
-		//	continue
-		//}
+		resp, tmpErr := data.RefreshEdbData(v.EdbInfoId, v.Source, v.SubSource, v.EdbCode, startDate)
+		if tmpErr != nil {
+			errMsgList = append(errMsgList, v.EdbCode+"RefreshEdbData Err:"+tmpErr.Error())
+			continue
+		}
+		if resp.Ret != 200 {
+			errMsgList = append(errMsgList, v.EdbCode+";RefreshEdbData Err:"+resp.Msg+";ErrMsg:"+resp.ErrMsg)
+			continue
+		}
 	}
 
 	fmt.Println("来源:", source, ";子来源:", subSource, "刷新结束")