This commit is contained in:
William Mantly 2017-10-09 00:28:29 -04:00
parent 14a628a8ff
commit 8e89c986bb

View File

@ -215,10 +215,9 @@ var workers = (function(){
workers.checkForZombies();
// if there are workers being created, stop scale up and down check
if(workers.currentCreating+workers.length < workers.min) 'do nothing';
if(workers.currentCreating+workers.length < workers.min) null;
else if(workers.currentCreating)
return ;
return console.log('killing balance, worker is being created.');
// hold amount of workers with no used runners
var lastMinAval = 0;
@ -236,7 +235,7 @@ var workers = (function(){
if(lastMinAval > workers.settings.minAvail){
// Remove workers if there are more then the settings states
console.log(
'Last 3 runners not used, killing last runner',
`Last ${workers.settings.minAvail} workers not used, killing last worker`,
'lastMinAval:', lastMinAval,
'minAvail:', workers.settings.minAvail,
'workers:', workers.length
@ -247,7 +246,7 @@ var workers = (function(){
} else if(lastMinAval < workers.settings.minAvail){
// creates workers if the settings file demands it
console.log(
'last 3 workers have no free runners, starting droplet',
'last 3 workers have no free runners, starting worker',
'lastMinAval:', lastMinAval,
'minAvail:', workers.settings.minAvail,
'workers:', workers.length