diff --git a/HBBatchBeast/main.js b/HBBatchBeast/main.js index c2995bf..ab4ae17 100644 --- a/HBBatchBeast/main.js +++ b/HBBatchBeast/main.js @@ -25,7 +25,7 @@ const { app, BrowserWindow, Menu, ipcMain ,Tray} = electron; let mainWindow; //SET ENV -//process.env.NODE_ENV = "production"; +process.env.NODE_ENV = "production"; @@ -43,7 +43,7 @@ app.on('ready', function () { mainWindow = new BrowserWindow({ width: 1400, height: 1000, - frame: false, + // frame: false, title: 'HBBatchBeast' diff --git a/HBBatchBeast/mainWindow.html b/HBBatchBeast/mainWindow.html index 0d6ffbc..05836fb 100644 --- a/HBBatchBeast/mainWindow.html +++ b/HBBatchBeast/mainWindow.html @@ -17,7 +17,7 @@ //SET ENV - // process.env.NODE_ENV = "production"; + process.env.NODE_ENV = "production"; var home = require("os").homedir(); @@ -53,11 +53,11 @@ } - // process.on('uncaughtException', function (err) { - // console.error(err.stack); - // fs.appendFileSync(homePath + '/HBBatchBeast/Logs/SystemErrorLog.txt', "Main thread error: " + err.stack + "\r\n", 'utf8'); - // process.exit(); - // }); + process.on('uncaughtException', function (err) { + console.error(err.stack); + fs.appendFileSync(homePath + '/HBBatchBeast/Logs/SystemErrorLog.txt', "Main thread error: " + err.stack + "\r\n", 'utf8'); + process.exit(); + }); @@ -1554,6 +1554,8 @@ for (var i = 1; i <= document.getElementById("instanceNumber").value; i++) { + + document.getElementById("workerStatusDiv").innerHTML += "
"; } @@ -1780,7 +1782,7 @@ } - document.getElementById("worker" + message[0] + "Status").innerHTML = "

Worker " + message[0] + " processing file:

" + sourceQueueArray[message[2]] + "

"; + document.getElementById("worker" + message[0] + "Status").innerHTML = "

Worker " + message[0] + " processing file:

" + sourceQueueArray[message[2]] + "

"; // workerStatusDiv @@ -1790,6 +1792,11 @@ if (message[1] == "percentage") { + // document.getElementById("workerStatusDiv").innerHTML += "
"; + + document.getElementById("worker" + message[0] + "Percentage").innerHTML = "

" + message[3] + "

"; + + var currentRow = parseInt(message[2]) + 1 if (queueView == "enabled") { @@ -1821,6 +1828,8 @@ queueTable.rows[currentRow].style.backgroundColor = "#ff2d2d"; } + document.getElementById("worker" + message[0] + "Percentage").innerHTML = "

Error

"; + fullErrorLogArray[message[2]] =message[4]; @@ -1845,6 +1854,8 @@ queueTable.rows[currentRow].style.backgroundColor = "#59ff74"; } + document.getElementById("worker" + message[0] + "Percentage").innerHTML = "

Completed

"; + fullErrorLogArray[message[2]] =message[4]; successfulCount++; @@ -2830,6 +2841,8 @@ document.getElementById("pauseButtonDiv").style.display = 'none'; document.getElementById("continueButtonDiv").style.display = 'block'; + alert("Queue will be paused once current items have finished processing. Please do not press 'Continue queue' until all workers have paused.") + } function continueQueue(){ diff --git a/HBBatchBeast/worker1.js b/HBBatchBeast/worker1.js index 2c1b7ee..3bc05ec 100644 --- a/HBBatchBeast/worker1.js +++ b/HBBatchBeast/worker1.js @@ -1,5 +1,5 @@ //SET ENV -//process.env.NODE_ENV = "production"; +process.env.NODE_ENV = "production"; var shell = require('shelljs');