stuff
This commit is contained in:
parent
e01794edbc
commit
ef2e953366
6
app.js
6
app.js
@ -18,6 +18,12 @@ app.use(bodyParser.urlencoded({ extended: false }));
|
||||
app.use(cookieParser());
|
||||
app.use(express.static(path.join(__dirname, 'public')));
|
||||
|
||||
app.use(function(req, res, next) {
|
||||
res.header("Access-Control-Allow-Origin", "*");
|
||||
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
|
||||
next();
|
||||
});
|
||||
|
||||
app.use('/', require('./routes/index'));
|
||||
app.use('/api', require('./routes/api'));
|
||||
|
||||
|
@ -24,6 +24,7 @@ var workers = (function(){
|
||||
image: workers.settings.image,
|
||||
size: workers.settings.size,
|
||||
onCreate: function(data){
|
||||
console.log(data)
|
||||
doapi.dropletSetTag('clwV'+workers.settings.version, data.droplet.id);
|
||||
},
|
||||
onActive: function(worker, args){
|
||||
@ -116,7 +117,7 @@ var workers = (function(){
|
||||
console.log('blocked outdated worker', workers.settings.image, args.worker.image.id)
|
||||
return ;
|
||||
}
|
||||
args.stopPercent = args.stopPercent || 20;
|
||||
args.stopPercent = args.stopPercent || 80;
|
||||
args.onStart = args.onStart || function(){};
|
||||
args.onDone = args.onDone || function(){};
|
||||
|
||||
@ -390,6 +391,7 @@ router.get('/liststuff', function(req, res, next){
|
||||
});
|
||||
|
||||
router.get('/ping/:runner', function(req, res, next){
|
||||
var runner = label2runner[req.params.runner];
|
||||
runnerTimeout(runner);
|
||||
res.json({res:''});
|
||||
});
|
||||
|
@ -1 +1 @@
|
||||
{"image":"17641214","version":5,"lastSnapShotId":"0","size":"2gb","max":100,"min":1,"minAvail":1}
|
||||
{"image":"23505298","version":9,"lastSnapShotId":"18670778","size":"512mb","max":100,"min":3,"minAvail":3}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"image": "18607562",
|
||||
"version": 5,
|
||||
"image": "23469057",
|
||||
"version": 8,
|
||||
"size": "512mb",
|
||||
"max": 100,
|
||||
"min": 3,
|
||||
|
Loading…
x
Reference in New Issue
Block a user