stuff
This commit is contained in:
parent
ed2b37d696
commit
66f6c3b92a
@ -98,7 +98,7 @@ var getAvailContainer = function(){
|
|||||||
var i = -1;
|
var i = -1;
|
||||||
while(workers[++i].availContainers.length){
|
while(workers[++i].availContainers.length){
|
||||||
console.log('found avail on worker:', i);
|
console.log('found avail on worker:', i);
|
||||||
var container = wrokers[i].availContainers.pop();
|
var container = workers[i].availContainers.pop();
|
||||||
label2container[container.label] = container;
|
label2container[container.label] = container;
|
||||||
container.worker.usedContainer++;
|
container.worker.usedContainer++;
|
||||||
console.log('return container:', container);
|
console.log('return container:', container);
|
||||||
@ -107,7 +107,7 @@ var getAvailContainer = function(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
var startWorker = function(worker, stopPercent){
|
var startWorker = function(worker, stopPercent){
|
||||||
stopPercent = stopPercent || 30;
|
stopPercent = stopPercent || 60;
|
||||||
getFreeMem(worker.ip, function(usedMemPercent){
|
getFreeMem(worker.ip, function(usedMemPercent){
|
||||||
if(usedMemPercent < stopPercent ){
|
if(usedMemPercent < stopPercent ){
|
||||||
var name = 'crunner-'+(Math.random()*100).toString().replace('.','');
|
var name = 'crunner-'+(Math.random()*100).toString().replace('.','');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user