|
@@ -137,3 +137,18 @@ func CheckDataInterface() (err error) {
|
|
|
}()
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+func CheckPbDataInterface() (err error) {
|
|
|
+ go func() {
|
|
|
+ checkUrl := utils.Hz_Data_PB_Url + `hz_server`
|
|
|
+ body, err := http.Get(checkUrl)
|
|
|
+ if err != nil {
|
|
|
+ go utils.SendEmail(utils.APPNAME+"【"+utils.RunMode+"】"+"检测数据接口:失败提醒", "CheckPbDataInterface ErrMsg:"+err.Error(), utils.EmailSendToUsers)
|
|
|
+ }
|
|
|
+ result := string(body)
|
|
|
+ if result != "1" {
|
|
|
+ go utils.SendEmail(utils.APPNAME+"【"+utils.RunMode+"】"+"检测数据接口:失败提醒", "CheckPbDataInterface ErrMsg:"+string(body), utils.EmailSendToUsers)
|
|
|
+ }
|
|
|
+ }()
|
|
|
+ return
|
|
|
+}
|