workers
This commit is contained in:
parent
f503f370b2
commit
f875bf101a
@ -34,6 +34,7 @@ var getWorkers = function(){
|
||||
data = JSON.parse(data);
|
||||
data.forEach(function(value){
|
||||
workers[value.name] = makeWokerObj(value);
|
||||
startWorkers(workers[value.name]);
|
||||
});
|
||||
});
|
||||
};
|
||||
@ -107,7 +108,8 @@ var startWorkers = function(clworker, stopPercent){
|
||||
});
|
||||
};
|
||||
|
||||
startWorkers(workers.clworker0);
|
||||
|
||||
getWorkers();
|
||||
|
||||
router.get('/start/:name', function(req, res, next){
|
||||
return lxc.start(req.params.name, function(data){
|
||||
@ -163,6 +165,10 @@ router.get('/destroy/:name', function(req, res, next){
|
||||
});
|
||||
});
|
||||
|
||||
router.get('/liststuff', function(req, res, next){
|
||||
res.json({'workers': workers, 'availContainers': availContainers})
|
||||
});
|
||||
|
||||
router.get('/info/:name', function(req, res, next){
|
||||
return lxc.info(req.params.name, function(data){
|
||||
return res.json(data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user