Commit 2854206b by 王悦

process.env.APP_ENV === "prod"

parent 3f0483f2
...@@ -6,14 +6,16 @@ class dingClient { ...@@ -6,14 +6,16 @@ class dingClient {
} }
//推送峰擎异常提醒 //推送峰擎异常提醒
async gatewayPushError(err) { async gatewayPushError(err) {
let c = `注意提醒:阿里->推送峰擎异常,老板们加油,加油,加油 !!!${JSON.stringify(err)}` if (process.env.APP_ENV === "prod") {
let t = new Date().toLocaleString() let c = `注意提醒:阿里->推送峰擎异常,老板们加油,加油,加油 !!!${JSON.stringify(err)}`
this.execClient.execPost({ let t = new Date().toLocaleString()
"msgtype": "text", this.execClient.execPost({
"text": {"content": t + c} "msgtype": "text",
}, this.gatewayurl).catch(alierr=>{ "text": {"content": t + c}
console.log(alierr) }, this.gatewayurl).catch(alierr => {
}); console.log(alierr)
});
}
} }
} }
module.exports = dingClient; module.exports = dingClient;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment