Skip to content

Commit 6b39d19

Browse files
committed
feat: try to optimize memory usage
1 parent e950349 commit 6b39d19

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ci
1+
name: CI
22

33
on:
44
push:

service/utils.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,15 @@ export const runVlmcs = ({
2121
content: stdout.trim(),
2222
status: err ? false : true,
2323
})
24-
vlmcs.kill()
2524
},
2625
)
26+
27+
vlmcs.on('error', () => {
28+
vlmcs.kill()
29+
})
30+
31+
vlmcs.on('close', () => {
32+
vlmcs.kill()
33+
})
2734
})
2835
}

0 commit comments

Comments
 (0)