This commit is contained in:
2016-05-16 17:07:02 -04:00
parent 152b206f9c
commit ae2a4984e4

View File

@ -63,11 +63,11 @@ var runner = function(req, res, container){
};
var startWorkers = function(clworker, stopPercent){
stopPercent = stopPercent || 75;
stopPercent = stopPercent || 10;
console.log(clworker)
getFreeMem(clworker.ip, function(usedMemPercent){
console.log(arguments)
if(usedMemPercent < 75 ){
if(usedMemPercent < stopPercent ){
var name = 'crunner-'+(Math.random()*100).toString().replace('.','');
return lxc.startEphemeral(name, 'crunner0', clworker.ip, function(data){
console.log('worker:', clworker.name, 'name:', name)