Authored by htoooth

fix

... ... @@ -4,6 +4,7 @@ const schedule = require('node-schedule');
const Router = require('koa-router');
const moment = require('moment');
const Check = require('../../ci/checkcode');
const sendEmail = require('./profile').sendEmail;
const {
Project,
... ... @@ -111,6 +112,8 @@ module.exports = {
new Check(p.name, p.gitlab, p.checkbranch || 'master').check();
}
});
sendEmail();
});
},
};
\ No newline at end of file
... ...
... ... @@ -459,17 +459,5 @@ async function sendEmail() {
module.exports = {
router: r,
async report() {
let rule = new schedule.RecurrenceRule();
rule.dayOfWeek = [0, new schedule.Range(1, 6)];
rule.hour = 23;
rule.minute = 58;
// await sendEmail().catch(console.log);
schedule.scheduleJob(rule, async() => {
await sendEmail();
});
}
sendEmail
};
... ...
... ... @@ -4,8 +4,8 @@ const moment = require('moment');
function reporter(data, cb) {
const mailOptions = {
from: 'automan@yoho.cn',
// to: 'webtech@yoho.cn',
to: 'tao.huang@yoho.cn',
to: 'webtech@yoho.cn',
// to: 'tao.huang@yoho.cn',
subject: `线上项目错误结果最近三天结果汇总 ` + moment().format('YYYY-MM-DD HH:mm:ss'),
html: tpl(data['yohobuy-node']) + tpl(data['yohobuywap-node'])
};
... ...
... ... @@ -36,12 +36,9 @@ const mastersUrl = [
'/users'
];
// 代码规则检查
// 日常规则检查
checkcode.check();
// 错误报告
profile.report();
// 服务器监控数据采集
collectData.collect();
... ...
... ... @@ -26,14 +26,16 @@
word-break:break-all;
}
pre {
pre {
padding: 10px;
overflow: hidden;
font-family: consolas,monospace;
word-wrap: normal;
word-wrap: break-word;
word-break:break-all;
}
.errdetail {
margin-top: 10px;
... ...