diff --git a/routes/api.js b/routes/api.js index 8867970..f1e4968 100644 --- a/routes/api.js +++ b/routes/api.js @@ -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(); }