|
@@ -1415,6 +1415,26 @@ func ResetEdbInfoIsUpdate(cont context.Context) (err error) {
|
|
|
|
|
|
// CheckWindDataInterface 检测wind数据服务器
|
|
|
func CheckWindDataInterface(cont context.Context) (err error) {
|
|
|
+ for _, hzDataWindUrl := range utils.Hz_Data_WIND_Url_List {
|
|
|
+ go func(urlStr string) {
|
|
|
+ checkUrl := utils.Hz_Data_WIND_Url + `hz_server`
|
|
|
+ body, err := http.Get(checkUrl)
|
|
|
+ if err != nil {
|
|
|
+ msg := fmt.Sprintf("检测%s失败:CheckWindDataInterface ErrMsg:%s", urlStr, err.Error())
|
|
|
+ //go utils.SendEmail(utils.APPNAME+"【"+utils.RunMode+"】"+"检测数据接口:失败提醒", "检测路透数据服务器失败:CheckLtDataInterface ErrMsg:"+err.Error(), utils.EmailSendToUsers)
|
|
|
+ go alarm_msg.SendAlarmMsg(msg, 3)
|
|
|
+ } else {
|
|
|
+ result := string(body)
|
|
|
+ if result != `"wind true"` {
|
|
|
+ //go utils.SendEmail(utils.APPNAME+"【"+utils.RunMode+"】"+"检测数据接口:失败提醒", "检测路透数据服务器失败:CheckLtDataInterface ErrMsg:"+string(body), utils.EmailSendToUsers)
|
|
|
+ //msg := "检测Wind数据服务器2失败:CheckWindDataInterface ErrMsg:" + string(body)
|
|
|
+ msg := fmt.Sprintf("检测%s失败:CheckWindDataInterface ErrMsg:%s", urlStr, string(body))
|
|
|
+ go alarm_msg.SendAlarmMsg(msg, 3)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }(hzDataWindUrl)
|
|
|
+ }
|
|
|
+
|
|
|
go func() {
|
|
|
checkUrl := utils.Hz_Data_WIND_Url + `hz_server`
|
|
|
body, err := http.Get(checkUrl)
|
|
@@ -1424,7 +1444,7 @@ func CheckWindDataInterface(cont context.Context) (err error) {
|
|
|
go alarm_msg.SendAlarmMsg(msg, 3)
|
|
|
} else {
|
|
|
result := string(body)
|
|
|
- if result != `"ek true"` {
|
|
|
+ if result != `"wind true"` {
|
|
|
//go utils.SendEmail(utils.APPNAME+"【"+utils.RunMode+"】"+"检测数据接口:失败提醒", "检测路透数据服务器失败:CheckLtDataInterface ErrMsg:"+string(body), utils.EmailSendToUsers)
|
|
|
msg := "检测Wind数据服务器2失败:CheckWindDataInterface ErrMsg:" + string(body)
|
|
|
go alarm_msg.SendAlarmMsg(msg, 3)
|
|
@@ -1432,4 +1452,4 @@ func CheckWindDataInterface(cont context.Context) (err error) {
|
|
|
}
|
|
|
}()
|
|
|
return
|
|
|
-}
|
|
|
+}
|