stuff
This commit is contained in:
@ -58,12 +58,13 @@ var workerDestroy = function(worker){
|
|||||||
checkWorkersBalance();
|
checkWorkersBalance();
|
||||||
};
|
};
|
||||||
|
|
||||||
var checkWorkersBalance = function(count){
|
var checkWorkersBalance = function(){
|
||||||
if(isCheckingWorkers) return false;
|
if(isCheckingWorkers) return false;
|
||||||
isCheckingWorkers = true;
|
isCheckingWorkers = true;
|
||||||
var changed = false;
|
var changed = false;
|
||||||
console.log('checking balance');
|
console.log('checking balance');
|
||||||
if(workers.length < count){
|
|
||||||
|
if(workers.length < 2){
|
||||||
console.log('less then 2 workers, starting a droplet');
|
console.log('less then 2 workers, starting a droplet');
|
||||||
return workerCreate();
|
return workerCreate();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user