|
@@ -270,7 +270,18 @@ var EdbTaskRunNum int
|
|
|
|
|
|
|
|
|
func AddEdbTask(cont context.Context) (err error) {
|
|
|
-
|
|
|
+
|
|
|
+ failList := make([]string, 0)
|
|
|
+
|
|
|
+ defer func() {
|
|
|
+ if len(failList) > 0 {
|
|
|
+ fmt.Println("提醒失败:")
|
|
|
+ for _, v := range failList {
|
|
|
+ fmt.Println(v)
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }()
|
|
|
list, err := models.GetEdbInfoByFrequencyNotDay()
|
|
|
if err != nil {
|
|
|
fmt.Println("查询获取频度非日度 且 提醒时间不为空 的指标数据失败,Err:", err.Error())
|
|
@@ -304,9 +315,6 @@ func AddEdbTask(cont context.Context) (err error) {
|
|
|
nowYearFirstDay := utils.GetNowYearFirstDay()
|
|
|
nowYearLastDay := utils.GetNowYearLastDay()
|
|
|
|
|
|
-
|
|
|
- failList := make([]string, 0)
|
|
|
-
|
|
|
debugNoticeUserId := 0
|
|
|
if utils.RunMode == "debug" {
|
|
|
tmpWxUser, tmpErr := models.GetWxUserByMobile("17634786714")
|
|
@@ -432,7 +440,7 @@ func AddEdbTask(cont context.Context) (err error) {
|
|
|
|
|
|
if isNotice {
|
|
|
taskName := "edb_task_" + todayStr + ":" + fmt.Sprint(edb.TradeCode)
|
|
|
- fmt.Println(taskName, ";", edb.SecName)
|
|
|
+
|
|
|
|
|
|
|
|
|
tmpTaskFunc := func(ctx context.Context) (funcErr error) {
|
|
@@ -556,7 +564,7 @@ func AddEdbTask(cont context.Context) (err error) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- fmt.Println(tmpEdb.TradeCode, " funcIsNotice:", funcIsNotice)
|
|
|
+
|
|
|
|
|
|
if funcIsNotice {
|
|
|
|
|
@@ -659,10 +667,6 @@ func AddEdbTask(cont context.Context) (err error) {
|
|
|
}
|
|
|
|
|
|
EdbTaskRunNum++
|
|
|
-
|
|
|
- for _, v := range failList {
|
|
|
- fmt.Println(v)
|
|
|
- }
|
|
|
return
|
|
|
|
|
|
}
|