From e6dee5bde367735af57b4b79e38157481fe55a8e Mon Sep 17 00:00:00 2001 From: william Date: Sat, 28 May 2016 01:55:21 -0400 Subject: [PATCH] stuff --- routes/api.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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(); }