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) {
if (process.env.APP_ENV === "prod") {
let c = `注意提醒:阿里->推送峰擎异常,老板们加油,加油,加油 !!!${JSON.stringify(err)}` let c = `注意提醒:阿里->推送峰擎异常,老板们加油,加油,加油 !!!${JSON.stringify(err)}`
let t = new Date().toLocaleString() let t = new Date().toLocaleString()
this.execClient.execPost({ this.execClient.execPost({
"msgtype": "text", "msgtype": "text",
"text": {"content": t + c} "text": {"content": t + c}
}, this.gatewayurl).catch(alierr=>{ }, this.gatewayurl).catch(alierr => {
console.log(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