Browse Source

mongo tail

master
zeus 4 years ago
parent
commit
681970b4a7
  1. 11
      swarmlab-app/src/run/app.js

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

@ -14,6 +14,10 @@ const subClient = pubClient.duplicate();
io.adapter(createAdapter({ pubClient, subClient })); io.adapter(createAdapter({ pubClient, subClient }));
RedisClient.on("connect", function() {
console.log("You are now connected");
});
const MongoClient = require('mongodb').MongoClient; const MongoClient = require('mongodb').MongoClient;
//var chokidar = require("chokidar"); //var chokidar = require("chokidar");
@ -426,7 +430,12 @@ function onCollection(err, collection) {
resob1.user25user = resdata.data[i].res25user resob1.user25user = resdata.data[i].res25user
resob1.res25creator = resdata.data[i].res25creator resob1.res25creator = resdata.data[i].res25creator
resob1.res25fileforce = resdata.data[i].res25fileforce resob1.res25fileforce = resdata.data[i].res25fileforce
resobarray.push(resob1) resob1.tailed_path = pathfileval
//resobarray.push(resob1)
RedisClient.hmset(pathfileval,JSON.stringify(resob1))
RedisClient.hgetall(pathfileval, function(err, object) {
console.log('redis '+object);
});
} }
resob.data = resobarray resob.data = resobarray
//var indexfind = global.pipelines.findIndex(x => x.res25swarmlabname==resdata.data[0].res25swarmlabname); //var indexfind = global.pipelines.findIndex(x => x.res25swarmlabname==resdata.data[0].res25swarmlabname);

Loading…
Cancel
Save