updated logic and names

This commit is contained in:
Thomas Harvey 2017-10-16 19:27:18 -04:00
parent 178838366c
commit 32a338437e
2 changed files with 12 additions and 11 deletions

View File

@ -18,7 +18,7 @@ until [[ $memory -gt $maxMemoryUsage ]]; do
lxc-start-ephemeral -o $baseName -n $runnerName --union-type overlayfs -d;
if [[ $? -eq 0 ]]; then
runners="${runnerName};${runners}";
runners="${runners};${runnerName}";
fi
usedMemoryPercent;
done

View File

@ -143,7 +143,7 @@ var Worker = (function(){
});
};
proto.initialize = function(callback, config){
proto.initialize = function(hooks, config){
// Create droplet
// Once active the droplet begins to create runners
doapi.dropletToActive({
@ -158,7 +158,7 @@ var Worker = (function(){
},
onActive: function(data, args){
var worker = Worker.create(data);
worker.newStartRunners(callback);
worker.newStartRunners(hooks);
}
});
};
@ -195,7 +195,7 @@ var Worker = (function(){
console.log(arguments);
var runners = data.split(";");
for (let idx = 0, stop = runners.length; idx < stop; idx++){
if(runners[idx]){
var runner = Runner.create({
"name": runners[idx],
"worker": worker,
@ -203,6 +203,7 @@ var Worker = (function(){
});
worker.availrunners.push(runner);
}
}
worker.isBuildingRunners = false;
args.callback(worker);
}
@ -211,7 +212,7 @@ var Worker = (function(){
};
proto.startRunners = function(args){
proto.__XstartRunners = function(args){
var worker = this;
console.log('Starting runners on', worker.name, worker.ip);