Roc %!s(int64=2) %!d(string=hai) anos
pai
achega
1ff84e658c
Modificáronse 1 ficheiros con 17 adicións e 0 borrados
  1. 17 0
      services/data/edb_info.go

+ 17 - 0
services/data/edb_info.go

@@ -1519,6 +1519,23 @@ func CheckWindDataInterface(cont context.Context) (err error) {
 			}
 		}(hzDataWindUrl)
 	}
+
+	go func() {
+		checkUrl := utils.Hz_Data_WIND_Url + `hz_server`
+		body, err := http.Get(checkUrl)
+		if err != nil {
+			//go utils.SendEmail(utils.APPNAME+"【"+utils.RunMode+"】"+"检测数据接口:失败提醒", "检测路透数据服务器失败:CheckLtDataInterface ErrMsg:"+err.Error(), utils.EmailSendToUsers)
+			msg := "检测Wind数据服务器2失败:CheckWindDataInterface ErrMsg:" + err.Error()
+			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)
+				go alarm_msg.SendAlarmMsg(msg, 3)
+			}
+		}
+	}()
 	return
 }