This commit is contained in:
William Mantly 2016-05-26 19:47:13 -04:00
parent 0e7ccf2637
commit 61dedb013d

View File

@ -97,6 +97,7 @@ var getWorkers = function(){
var getAvailContainer = function(){ var getAvailContainer = function(){
var i = -1; var i = -1;
while(workers[++i].availContainers.length){ while(workers[++i].availContainers.length){
console.log('found avail');
var container = wrokers[i].availContainers.pop(); var container = wrokers[i].availContainers.pop();
label2container[container.label] = container; label2container[container.label] = container;
container.worker.usedContainer++; container.worker.usedContainer++;
@ -196,7 +197,7 @@ router.get('/stop/:name', function(req, res, next){
}); });
router.get('/liststuff', function(req, res, next){ router.get('/liststuff', function(req, res, next){
res.json({'workers': workers, 'availContainers': availContainers}) res.json({'workers': workers})
}); });
router.post('/run/:ip?', function doRun(req, res, next){ router.post('/run/:ip?', function doRun(req, res, next){