Browse Source

watcher

master
zeus 4 years ago
parent
commit
81ab762a1b
  1. 5
      swarmlab-app/src/run/app.js

5
swarmlab-app/src/run/app.js

@ -200,7 +200,7 @@ global.pipelines=[];
//console.log('Filepath1 ', pathfileval, ' check'); //console.log('Filepath1 ', pathfileval, ' check');
var arrfile = pathfileval.toString().split("-"); var arrfile = pathfileval.toString().split("-");
var pathfile = arrfile[0]; var pathfile = arrfile[0];
console.log('Filepath ', pathfile, ' check'); //console.log('Filepath ', pathfile, ' check');
// /var/lab/playground-serverlogs/ondemand_playgroundnodejs_masterJPMqt1Jr-RgpMZFwJ-log // /var/lab/playground-serverlogs/ondemand_playgroundnodejs_masterJPMqt1Jr-RgpMZFwJ-log
// ondemand_playgroundnodejs_masterPQvbrWga-AQxgfnSJ-output // ondemand_playgroundnodejs_masterPQvbrWga-AQxgfnSJ-output
(async() => { (async() => {
@ -209,6 +209,7 @@ global.pipelines=[];
//console.log('info-------->>>>>>>>>>>> ', JSON.stringify(resdata)); //console.log('info-------->>>>>>>>>>>> ', JSON.stringify(resdata));
//console.log('info----------------------- ', JSON.stringify(resdata.data)); //console.log('info----------------------- ', JSON.stringify(resdata.data));
var resob = resdata.data var resob = resdata.data
resob.pathlogfile = pathfileval
var indexfind = global.pipelines.findIndex(x => x.res25swarmlabname==resdata.data.res25swarmlabname); var indexfind = global.pipelines.findIndex(x => x.res25swarmlabname==resdata.data.res25swarmlabname);
//indexfind === -1 ? global.pipelines.push({resob}) : console.log("object already exists") //indexfind === -1 ? global.pipelines.push({resob}) : console.log("object already exists")
@ -277,6 +278,8 @@ cors(corsOptions), (req, res, next) => {
for (var i = 0; i < req.body.length; i++){ for (var i = 0; i < req.body.length; i++){
var obj = req.body[i]; var obj = req.body[i];
//var indexfind = global.pipelines.findIndex(x => x.res25swarmlabname==resdata.data.res25swarmlabname);
//indexfind === -1 ? global.pipelines.push(resob) : console.log("object already exists")
var now = new Date(); var now = new Date();
var reslog = new Object(); var reslog = new Object();

Loading…
Cancel
Save