updated README with TODOS. FIxed kill command and sleep() command in script

This commit is contained in:
Daniel Xie
2016-12-13 17:52:32 -06:00
parent 2e6206ac16
commit c485f28e20
6 changed files with 147 additions and 79 deletions
+2 -1
View File
@@ -49,7 +49,7 @@ function runScriptsLoop() {
//items fucks up the indexing
for (var i = workerScripts.length - 1; i >= 0; i--) {
if (workerScripts[i].running == false && workerScripts[i].env.stopFlag == true) {
console.log("Deleting scripts");
console.log("Deleting script: " + workerScripts[i].name);
//Delete script from the runningScripts array on its host serverIp
var ip = workerScripts[i].serverIp;
var name = workerScripts[i].name;
@@ -72,6 +72,7 @@ function runScriptsLoop() {
//all of its promises recursively, and when it does so it will no longer be running.
//The runScriptsLoop() will then delete the script from worker scripts
function killWorkerScript(scriptName, serverIp) {
console.log("killWorkerScript called for script " + scriptName + " on server " + serverIp);
for (var i = 0; i < workerScripts.length; i++) {
if (workerScripts[i].name == scriptName && workerScripts[i].serverIp == serverIp) {
workerScripts[i].env.stopFlag = true;