This commit is contained in:
2016-05-28 01:55:21 -04:00
parent 586c8cc32f
commit e6dee5bde3

View File

@ -58,12 +58,13 @@ var workerDestroy = function(worker){
checkWorkersBalance();
};
var checkWorkersBalance = function(count){
var checkWorkersBalance = function(){
if(isCheckingWorkers) return false;
isCheckingWorkers = true;
var changed = false;
console.log('checking balance');
if(workers.length < count){
if(workers.length < 2){
console.log('less then 2 workers, starting a droplet');
return workerCreate();
}