Fixed loadAllRunningScripts(), now seems to be working properly

This commit is contained in:
Daniel Xie
2016-12-15 11:51:23 -06:00
parent 7ec22480a2
commit 96fb37c6d1
9 changed files with 124 additions and 23 deletions
+1 -3
View File
@@ -85,9 +85,6 @@ function killWorkerScript(scriptName, serverIp) {
function addWorkerScript(script, server) {
var filename = script.filename;
//Add script onto server's runningScripts
server.runningScripts.push(filename);
//Update server's ram usage
server.ramUsed += script.ramUsage;
@@ -98,6 +95,7 @@ function addWorkerScript(script, server) {
s.serverIp = server.ip;
workerScripts.push(s);
console.log("Pushed script onto workerScripts");
return;
}
runScriptsLoop();