mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
增加定时任务服务启动失败日志
This commit is contained in:
@@ -17,10 +17,13 @@ const check = async (
|
||||
if (res.includes('200')) {
|
||||
return callback(null, { status: 1 });
|
||||
}
|
||||
const errLog = await promiseExec(
|
||||
const panelErrLog = await promiseExec(
|
||||
`tail -n 300 ~/.pm2/logs/panel-error.log`,
|
||||
);
|
||||
return callback(new Error(errLog));
|
||||
const scheduleErrLog = await promiseExec(
|
||||
`tail -n 300 ~/.pm2/logs/schedule-error.log`,
|
||||
);
|
||||
return callback(new Error(`${scheduleErrLog}\n${panelErrLog}`));
|
||||
|
||||
default:
|
||||
return callback(null, { status: 1 });
|
||||
|
||||
Reference in New Issue
Block a user