任务执行异常时 ,增加通知提醒

This commit is contained in:
lxk0301
2021-03-29 10:37:26 +08:00
parent e115936c97
commit 0bb875a6fd
3 changed files with 10 additions and 2 deletions

View File

@ -124,8 +124,10 @@ async function jdFruit() {
}
} catch (e) {
console.log(`任务执行异常,请检查执行日志 ‼️‼️`);
message = `任务执行异常,请检查执行日志 ‼️‼️`;
$.logErr(e);
const errMsg = `京东账号${$.index} ${$.nickName || $.UserName}\n任务执行异常,请检查执行日志 ‼️‼️`;
if ($.isNode()) await notify.sendNotify(`${$.name}`, errMsg);
$.msg($.name, '', `京东账号${$.index} ${$.nickName || $.UserName}\n${errMsg}`)
}
await showMsg();
}