mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-06 07:57:06 +08:00
add suicide timer in auto chat daemon for parent and child process don't have any communication after child process spawned in 10s.
This commit is contained in:
@@ -135,6 +135,14 @@ export function createMainWindow(): void {
|
||||
subProcessOfPuppeteer!.stdio[3]!.pipe(JSONStream.parse()).on('data', async (raw) => {
|
||||
const data = raw
|
||||
switch (data.type) {
|
||||
case 'DAEMON_PROCESS_STARTUP': {
|
||||
subProcessOfPuppeteer!.stdio[3]!.write(
|
||||
JSON.stringify({
|
||||
type: 'GEEK_AUTO_START_CHAT_CAN_BE_RUN'
|
||||
})
|
||||
)
|
||||
break
|
||||
}
|
||||
case 'GEEK_AUTO_START_CHAT_WITH_BOSS_STARTED': {
|
||||
resolve(data)
|
||||
break
|
||||
@@ -228,7 +236,7 @@ export function createMainWindow(): void {
|
||||
|
||||
ipcMain.handle('stop-geek-auto-start-chat-with-boss', async () => {
|
||||
mainWindow?.webContents.send('geek-auto-start-chat-with-boss-stopping')
|
||||
subProcessOfPuppeteer?.kill('SIGINT')
|
||||
subProcessOfPuppeteer?.kill()
|
||||
})
|
||||
|
||||
let subProcessOfBossZhipinLoginPageWithPreloadExtension: ChildProcess | null = null
|
||||
|
||||
Reference in New Issue
Block a user