From 718964ab8629588de9b6e6a6a9cea3f2b5bc85da Mon Sep 17 00:00:00 2001 From: whyour Date: Sat, 18 Jun 2022 12:30:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dnode=20kill=E8=BF=9B=E7=A8=8B?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/services/cron.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/back/services/cron.ts b/back/services/cron.ts index 5897fac1..91ba740b 100644 --- a/back/services/cron.ts +++ b/back/services/cron.ts @@ -228,6 +228,7 @@ export default class CronService { const killLogs = []; if (pids && pids.length > 0) { // node 执行脚本时还会有10个子进程,但是ps -ef中不存在,所以截取前三个 + pids = pids.slice(0, 3); for (const id of pids) { const c = `kill -9 ${id.slice(1)}`; try {