From a358a5212a05b61d962ad50ee83d014882c4afd5 Mon Sep 17 00:00:00 2001 From: Thomas Harvey Date: Wed, 11 Oct 2017 23:25:17 -0400 Subject: [PATCH] Simplifing balance --- routes/worker_collection.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routes/worker_collection.js b/routes/worker_collection.js index f2cceec..7d424aa 100644 --- a/routes/worker_collection.js +++ b/routes/worker_collection.js @@ -353,7 +353,8 @@ var WorkerCollection = (function(){ workers.checkForZombies(); // if there are workers being created, stop scale up and down check - if(workers.currentCreating + workers.length >= workers.settings.min){ + var skipBalance = workers.currentCreating + workers.length >= workers.settings.min + if(skipBalance || workers.currentCreating){ return console.log(`Killing balance, workers are being created.`); }