mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-04 23:17:39 +08:00
change sqlite backend; upgrade electron; fix ipc file cannot listen in macOS
This commit is contained in:
+3
-12
@@ -38,18 +38,9 @@ if (!ipcSocketName) {
|
||||
process.env.GEEKGEEKRUND_PIPE_NAME = `geekgeekrun-d_${randomUUID()}`
|
||||
ipcSocketName = process.env.GEEKGEEKRUND_PIPE_NAME
|
||||
}
|
||||
let ipcSocketPath
|
||||
if (process.platform === 'win32') {
|
||||
ipcSocketPath = `\\\\.\\pipe\\${ipcSocketName}`
|
||||
}
|
||||
else {
|
||||
ipcSocketPath = path.join(tmpdir(), `${ipcSocketName}.sock`)
|
||||
if (process.platform === 'darwin' && !fs.existsSync(ipcSocketPath)) {
|
||||
fs.writeFileSync(ipcSocketPath, '')
|
||||
// 设置权限(Unix)
|
||||
fs.chmodSync(ipcSocketPath, 0o777)
|
||||
}
|
||||
}
|
||||
const ipcSocketPath = process.platform === 'win32'
|
||||
? `\\\\.\\pipe\\${ipcSocketName}`
|
||||
: path.join(tmpdir(), `${ipcSocketName}.sock`)
|
||||
|
||||
const workers = new Map(); // workerId -> { process, status, restartCount, socket, latestScreenshot, latestScreenshotAt }
|
||||
const guiClients = new Set(); // GUI客户端连接集合
|
||||
|
||||
Reference in New Issue
Block a user