增加任务重复运行提醒

This commit is contained in:
whyour
2024-08-23 09:37:26 +08:00
parent f4cb3eacf8
commit 8b8eae211b
7 changed files with 88 additions and 17 deletions
+4
View File
@@ -178,6 +178,7 @@ export default class SystemService {
},
{
command,
id: 'update-node-mirror',
},
);
}
@@ -252,6 +253,7 @@ export default class SystemService {
},
{
command,
id: 'update-linux-mirror',
},
);
}
@@ -363,6 +365,7 @@ export default class SystemService {
}
this.scheduleService.runTask(`real_time=true ${command}`, callback, {
command,
id: command.replace(/ /g, '-'),
});
}
@@ -371,6 +374,7 @@ export default class SystemService {
return { code: 400, message: '参数错误' };
}
taskLimit.removeQueuedCron(command.replace(/ /g, '-'));
if (pid) {
await killTask(pid);
return { code: 200 };