mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-28 09:02:12 +08:00
fix: verify task termination and preserve startup configuration
This commit is contained in:
@@ -58,9 +58,9 @@ export default class ScriptService {
|
||||
taskLimit.removeQueuedCron(relativePath.replace(/ /g, '-'));
|
||||
pid = (await getPid(`${TASK_COMMAND} ${relativePath} now`)) as number;
|
||||
}
|
||||
try {
|
||||
await killTask(pid);
|
||||
} catch (error) {}
|
||||
if (pid) {
|
||||
await killTask(pid, true);
|
||||
}
|
||||
|
||||
return { code: 200 };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user