|
@@ -283,7 +283,12 @@ func IndexRefreshMethanol() {
|
|
|
|
|
|
func IndexRefreshTimely() {
|
|
|
fmt.Println("IndexRefreshTimely")
|
|
|
- go alarm_msg.SendAlarmMsg(utils.APPNAME+" 及时刷新指标", 3)
|
|
|
+ listLen := 0
|
|
|
+ defer func() {
|
|
|
+ if listLen > 0 {
|
|
|
+ go alarm_msg.SendAlarmMsg(utils.APPNAME+" 及时刷新指标", 3)
|
|
|
+ }
|
|
|
+ }()
|
|
|
|
|
|
//indexObj := new(index.BaseFromMysteelChemicalIndex)
|
|
|
//list, err := indexObj.GetIndexRefreshMethanolByTimely()
|
|
@@ -292,8 +297,9 @@ func IndexRefreshTimely() {
|
|
|
fmt.Println("GetIndexRefreshAll Err:" + err.Error())
|
|
|
return
|
|
|
}
|
|
|
+ listLen = len(list)
|
|
|
fmt.Println("listLen:", len(list))
|
|
|
- if len(list) <= 0 {
|
|
|
+ if listLen <= 0 {
|
|
|
return
|
|
|
}
|
|
|
now := time.Now()
|