Authored by zhangwenxue

feature(alipay): add logger for dingtalk request error

... ... @@ -2,6 +2,7 @@ const _ = require('lodash');
const ddAlert = require('./dingding-alert');
const MIN_SEND_INTERVAL = 10 * 1000;
const moment = require('moment');
const logger = global.yoho.logger;
const AlertManager = {
isAtAll: false,
... ... @@ -28,7 +29,10 @@ const AlertManager = {
return agent.getMarkdownReport();
}));
ddAlert(text.join('\n'), _.uniq(ats), this.isAtAll);
ddAlert(text.join('\n'), _.uniq(ats), this.isAtAll)
.catch(e => {
logger.warn('AlertManager send dingtalk alert:', e);
});
this.lastSendTime = now;
this.pendingAgents = {};
}
... ...