Skip to content

Commit

Permalink
let's solve this eternal problem by muting the python worker
Browse files Browse the repository at this point in the history
  • Loading branch information
hsl-petrhaj committed Jun 29, 2023
1 parent 48a4606 commit f49beb1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ ipcMain.on('loggable-event-from-worker', (event, args) => {
// utils.log
event_args = JSON.parse(event_string);
} catch (error) {
// numpy warnings
// numpy warnings and other non-log messages
event_args = {
"level": "EXCEPTION",
"message": event_string,
Expand All @@ -167,10 +167,10 @@ ipcMain.on('loggable-event-from-worker', (event, args) => {
mainWindow.webContents.send('loggable-event', event_args);
});

// Log worker-errors (by PythonShell, not stderr) in main console
ipcMain.on('process-error-from-worker', (event, args) => {
mainWindow.webContents.send('loggable-event', {
"level": "ERROR",
"message": (typeof args === "string") ? args : JSON.stringify(args)
});
});
// // Log worker-errors (by PythonShell, not stderr) in main console
// ipcMain.on('process-error-from-worker', (event, args) => {
// mainWindow.webContents.send('loggable-event', {
// "level": "ERROR",
// "message": (typeof args === "string") ? args : JSON.stringify(args)
// });
// });

0 comments on commit f49beb1

Please sign in to comment.