|
@@ -1350,7 +1350,22 @@ func BatchChartInfoRefreshV2(chartInfoList []*data_manage.ChartInfo, redisKey st
|
|
|
if totalEdbInfo > 20 {
|
|
|
isAsync = true
|
|
|
isDeleteCache = false
|
|
|
- go refreshChartEdbInfo(chartInfoList, redisKey, newBaseEdbInfoArr, newBasePredictEdbInfoArr, newCalculateMap, newPredictCalculateMap, calculateArr, predictCalculateArr)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ var refreshItem EdbQueueRefreshReq
|
|
|
+ refreshItem.RefreshKey = redisKey
|
|
|
+ for _, v := range chartInfoList {
|
|
|
+ key := utils.HZ_CHART_LIB_DETAIL + v.UniqueCode
|
|
|
+ refreshItem.ItemRefreshKeys = append(refreshItem.ItemRefreshKeys, key)
|
|
|
+ }
|
|
|
+ refreshItem.BaseEdbInfoArr = newBaseEdbInfoArr
|
|
|
+ refreshItem.BasePredictEdbInfoArr = newBasePredictEdbInfoArr
|
|
|
+ refreshItem.CalculateMap = newCalculateMap
|
|
|
+ refreshItem.PredictCalculateMap = newPredictCalculateMap
|
|
|
+ refreshItem.CalculateArr = calculateArr
|
|
|
+ refreshItem.PredictCalculateArr = predictCalculateArr
|
|
|
+ go PushEdb2Refresh(refreshItem)
|
|
|
} else {
|
|
|
err = edbInfoRefreshAll(false, newBaseEdbInfoArr, newBasePredictEdbInfoArr, newCalculateMap, newPredictCalculateMap, calculateArr, predictCalculateArr)
|
|
|
|
|
@@ -1395,15 +1410,15 @@ func refreshChartEdbInfo(chartInfoList []*data_manage.ChartInfo, redisKey string
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
-func GetBatchChartRefreshKey(source string, reportId, reportChapterId int) string {
|
|
|
+func GetBatchChartRefreshKey(source string, primaryId, subId int) string {
|
|
|
if source == `` {
|
|
|
return ``
|
|
|
}
|
|
|
|
|
|
- return fmt.Sprint("batch_chart_refresh:", source, ":", reportId, ":", reportChapterId)
|
|
|
+ return fmt.Sprint("batch_chart_refresh:", source, ":", primaryId, ":", subId)
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1411,12 +1426,12 @@ func GetBatchChartRefreshKey(source string, reportId, reportChapterId int) strin
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
-func CheckBatchChartRefreshResult(source string, reportId, reportChapterId int) (refreshResult bool) {
|
|
|
+func CheckBatchChartRefreshResult(source string, primaryId, subId int) (refreshResult bool) {
|
|
|
refreshResult = true
|
|
|
- redisKey := GetBatchChartRefreshKey(source, reportId, reportChapterId)
|
|
|
+ redisKey := GetBatchChartRefreshKey(source, primaryId, subId)
|
|
|
if redisKey != `` {
|
|
|
|
|
|
isOk := utils.Rc.IsExist(redisKey)
|