This commit is contained in:
William Mantly 2016-05-30 17:03:21 -04:00
parent b8f72ef13c
commit c971b609ee

View File

@ -97,6 +97,7 @@ var workers = (function(){
console.log('starting runners on', worker.name) console.log('starting runners on', worker.name)
stopPercent = stopPercent || 80; stopPercent = stopPercent || 80;
ramPercentUsed(worker.ip, function(usedMemPercent){ ramPercentUsed(worker.ip, function(usedMemPercent){
console.log('using ', usedMemPercent, ' on ', worker.name, ' continueing');
if(usedMemPercent < stopPercent ){ if(usedMemPercent < stopPercent ){
var name = 'crunner-'+(Math.random()*100).toString().replace('.',''); var name = 'crunner-'+(Math.random()*100).toString().replace('.','');
return lxc.startEphemeral(name, 'crunner0', worker.ip, function(data){ return lxc.startEphemeral(name, 'crunner0', worker.ip, function(data){