xyxie hace 1 año
padre
commit
8cc7e92230
Se han modificado 2 ficheros con 7 adiciones y 6 borrados
  1. 3 5
      services/base_from_mysteel_chemical.go
  2. 4 1
      services/edb_info_stat.go

+ 3 - 5
services/base_from_mysteel_chemical.go

@@ -20,11 +20,9 @@ func HandleMysteelIndex(req *models.HandleMysteelIndexResp) (err error) {
 			return
 		}
 	}
-	
-	go func() {
-		_ = SetMysteelChemicalEdbInfoUpdateStat(false)
-		_ = SetEdbSourceStat(false)
-	}()
+
+	_ = SetMysteelChemicalEdbInfoUpdateStat(false)
+	_ = SetEdbSourceStat(false)
 
 	return
 }

+ 4 - 1
services/edb_info_stat.go

@@ -271,7 +271,10 @@ func checkMySteelEdbInfoNeedRefresh(edbCode, frequency string, weekNeedRefreshMa
 
 	//季度,月度,年度都是每个周末刷新
 	if week == 0 {
-		needRefresh = 1
+		if frequency == "旬度" || frequency == "月度" || frequency == "季度" || frequency == "年度" {
+			needRefresh = 1
+			return
+		}
 	}
 	return
 }