debug: 添加连接日志
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user