mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
修复修改任务状态可能报错
This commit is contained in:
@@ -114,7 +114,13 @@ export default class CronService {
|
||||
}
|
||||
|
||||
for (const id of ids) {
|
||||
const cron = await this.getDb({ id });
|
||||
let cron;
|
||||
try {
|
||||
cron = await this.getDb({ id });
|
||||
} catch (err) {}
|
||||
if (!cron) {
|
||||
continue;
|
||||
}
|
||||
if (status === CrontabStatus.idle && log_path !== cron.log_path) {
|
||||
options = omit(options, ['status', 'log_path', 'pid']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user