debug: 添加连接日志

This commit is contained in:
2026-07-04 20:06:43 +08:00
parent 88dfedc544
commit d488612c27
2 changed files with 8 additions and 2 deletions
+3 -1
View File
@@ -70,10 +70,12 @@ export function registerIpcHandlers(): void {
// Redis
ipcMain.handle('redis:connect', async (_e, id: string, opts) => {
try {
console.log(`[IPC] redis:connect id=${id}`, opts)
await redisService.connect(id, opts)
return { success: true }
} catch (err: any) {
return { success: false, error: err.message }
console.error(`[IPC] redis:connect error:`, err.message)
return { success: false, error: err.message || String(err) }
}
})
ipcMain.handle('redis:disconnect', async (_e, id: string) => {