asd #1

Closed
wmantly wants to merge 44 commits from refactor-workers into master
2 changed files with 4 additions and 4 deletions
Showing only changes of commit a1a85b2c69 - Show all commits

View File

@ -105,9 +105,9 @@ var Worker = (function(){
};
proto.startRunners = function(args){
console.log('Starting runners on', args.worker.name, args.worker.ip);
var worker = this;
console.log('Starting runners on', worker.name, worker.ip);
// dont make runners on out dated workers
if(!worker || worker.settings.image > worker.image.id){
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
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.`);
}

View File

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