mirror of
https://github.com/whyour/qinglong.git
synced 2025-12-28 02:35:39 +08:00
修复运行中任务停止操作
This commit is contained in:
parent
91b44914f6
commit
d526602d19
|
|
@ -467,7 +467,10 @@ export default class CronService {
|
|||
for (const doc of docs) {
|
||||
// Kill all running instances of this task
|
||||
try {
|
||||
const command = this.makeCommand(doc);
|
||||
if (doc.pid) {
|
||||
await killTask(doc.pid);
|
||||
}
|
||||
const command = doc.command.replace(/\s+/g, ' ').trim();
|
||||
await killAllTasks(command);
|
||||
this.logger.info(
|
||||
`[panel][停止所有运行中的任务实例] 任务ID: ${doc.id}, 命令: ${command}`,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user