This commit is contained in:
Thomas Harvey 2017-10-12 00:58:13 -04:00
parent a358a5212a
commit a1a85b2c69
2 changed files with 4 additions and 4 deletions

View File

@ -105,9 +105,9 @@ var Worker = (function(){
}; };
proto.startRunners = function(args){ proto.startRunners = function(args){
console.log('Starting runners on', args.worker.name, args.worker.ip);
var worker = this; var worker = this;
console.log('Starting runners on', worker.name, worker.ip);
// dont make runners on out dated workers // dont make runners on out dated workers
if(!worker || worker.settings.image > worker.image.id){ if(!worker || worker.settings.image > worker.image.id){
console.log(`Blocked outdated worker(${worker.image.id}), current image ${args.settings.image}.`) console.log(`Blocked outdated worker(${worker.image.id}), current image ${args.settings.image}.`)
@ -354,7 +354,7 @@ var WorkerCollection = (function(){
// if there are workers being created, stop scale up and down check // if there are workers being created, stop scale up and down check
var skipBalance = workers.currentCreating + workers.length >= workers.settings.min var skipBalance = workers.currentCreating + workers.length >= workers.settings.min
if(skipBalance || workers.currentCreating){ if(workers.currentCreating && skipBalance){
return console.log(`Killing balance, workers are being created.`); return console.log(`Killing balance, workers are being created.`);
} }

View File

@ -63,4 +63,4 @@ let __do = function(till){
setTimeout(__do, 1500, --till); setTimeout(__do, 1500, --till);
}; };
__do(500); __do(1000);