Browse Source

PCSG-定时任务调整

hsun 10 months ago
parent
commit
a97be85757
3 changed files with 7 additions and 6 deletions
  1. 4 4
      services/task.go
  2. 3 1
      utils/config.go
  3. 0 1
      utils/constants.go

+ 4 - 4
services/task.go

@@ -118,14 +118,14 @@ func releaseTask() {
 	}
 
 	// 中石油新加坡
-	if utils.BusinessCode == utils.BusinessCodePCSG {
+	if utils.IsPCSG == "1" {
 		refreshPCSGBloombergDaily := task.NewTask("refreshPCSGBloombergDaily", "0 30 9 * * *", data.RefreshPCSGBloombergDaily)
 		task.AddTask("刷新中石油新加坡-Bloomberg日度指标", refreshPCSGBloombergDaily)
 
-		refreshPCSGBloombergWeekly := task.NewTask("refreshPCSGBloombergWeekly", "0 30 9 * * *", data.RefreshPCSGBloombergWeekly)
-		task.AddTask("刷新中石油新加坡-Bloomberg周度指标", refreshPCSGBloombergWeekly)
+		//refreshPCSGBloombergWeekly := task.NewTask("refreshPCSGBloombergWeekly", "0 30 9 * * *", data.RefreshPCSGBloombergWeekly)
+		//task.AddTask("刷新中石油新加坡-Bloomberg周度指标", refreshPCSGBloombergWeekly)
 
-		refreshPCSGBloombergMonthly := task.NewTask("refreshPCSGBloombergMonthly", "0 30 9 * * *", data.RefreshPCSGBloombergMonthly)
+		refreshPCSGBloombergMonthly := task.NewTask("refreshPCSGBloombergMonthly", "0 32 9 * * *", data.RefreshPCSGBloombergMonthly)
 		task.AddTask("刷新中石油新加坡-Bloomberg月度指标", refreshPCSGBloombergMonthly)
 	}
 }

+ 3 - 1
utils/config.go

@@ -117,7 +117,8 @@ var (
 
 var (
 	// 是否xy
-	IsXy string
+	IsXy   string
+	IsPCSG string
 )
 
 var (
@@ -269,6 +270,7 @@ func init() {
 	// 客户信息
 	{
 		IsXy = config["is_xy"]
+		IsPCSG = config["is_pcsg"]
 	}
 
 	// 桥接服务

+ 0 - 1
utils/constants.go

@@ -144,7 +144,6 @@ const (
 	BusinessCodeRelease = "E2023080900" // 生产环境
 	BusinessCodeJiaYue  = "E2023092201" // 嘉悦物产
 	BusinessCodeZhongJi = "E2023110300" // 中基宁波
-	BusinessCodePCSG    = "E2024022900" // 中石油新加坡
 )
 
 // 子数据来源渠道