mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 09:45:36 +08:00
使用 spawn exit 方法监听进程退出
This commit is contained in:
1 parent
ec5b885476
commit
00818b694a
4 files changed
+4
-4
No files matched your search
@@ -427,7 +427,7 @@ export default class CronService {
|
||||
fs.appendFileSync(`${absolutePath}`, `${JSON.stringify(err)}`);
|
||||
});
|
||||
|
||||
cp.on('close', async (code) => {
|
||||
cp.on('exit', async (code) => {
|
||||
await CrontabModel.update(
|
||||
{ status: CrontabStatus.idle, pid: undefined },
|
||||
{ where: { id } },
|
||||
|
||||
Reference in new issue
Block a user