|
@ -26,15 +26,6 @@ pubClient.on("connect", function() { |
|
|
|
|
|
|
|
|
const MongoClient = require('mongodb').MongoClient; |
|
|
const MongoClient = require('mongodb').MongoClient; |
|
|
|
|
|
|
|
|
//var chokidar = require("chokidar");
|
|
|
|
|
|
//var logpath = "/var/lab/playground-serverlogs";
|
|
|
|
|
|
//var watcher = chokidar.watch(logpath, {
|
|
|
|
|
|
// ignored: /[\/\\]\./,
|
|
|
|
|
|
// awaitWriteFinish: true,
|
|
|
|
|
|
// persistent: true
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var async = require("async"); |
|
|
var async = require("async"); |
|
|
const { check, validationResult } = require('express-validator'); |
|
|
const { check, validationResult } = require('express-validator'); |
|
|
const urlExistSync = require("url-exist-sync"); |
|
|
const urlExistSync = require("url-exist-sync"); |
|
@ -470,7 +461,10 @@ function onCollection(err, collection) { |
|
|
//console.log('data ' + JSON.stringify(reslog));
|
|
|
//console.log('data ' + JSON.stringify(reslog));
|
|
|
//var usertmp = global.pipelines.find(x => x.pathlogfile==pathfileval);
|
|
|
//var usertmp = global.pipelines.find(x => x.pathlogfile==pathfileval);
|
|
|
//var user = usertmp.data[0].user25user;
|
|
|
//var user = usertmp.data[0].user25user;
|
|
|
var user = "anagnostopoulos@uniwa.gr" |
|
|
await pubClient.get(pathfileval, function(err, object) { |
|
|
|
|
|
console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> '+JSON.stringify(object)); |
|
|
|
|
|
var user = object.user25user |
|
|
|
|
|
}); |
|
|
console.log('datauser ' + JSON.stringify(user)); |
|
|
console.log('datauser ' + JSON.stringify(user)); |
|
|
io.in(user).emit("logdata", reslog); |
|
|
io.in(user).emit("logdata", reslog); |
|
|
itemsProcessed++; |
|
|
itemsProcessed++; |
|
@ -484,7 +478,11 @@ function onCollection(err, collection) { |
|
|
//var usertmp = global.pipelines.find(x => x.pathlogfile==pathfileval);
|
|
|
//var usertmp = global.pipelines.find(x => x.pathlogfile==pathfileval);
|
|
|
//var user = usertmp.data[0].user25user;
|
|
|
//var user = usertmp.data[0].user25user;
|
|
|
///console.log('datauser ' + JSON.stringify(user));
|
|
|
///console.log('datauser ' + JSON.stringify(user));
|
|
|
var user = "anagnostopoulos@uniwa.gr" |
|
|
//var user = "anagnostopoulos@uniwa.gr"
|
|
|
|
|
|
await pubClient.get(pathfileval, function(err, object) { |
|
|
|
|
|
console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> '+JSON.stringify(object)); |
|
|
|
|
|
var user = object.user25user |
|
|
|
|
|
}); |
|
|
io.in(user).emit("logdata", reslog); |
|
|
io.in(user).emit("logdata", reslog); |
|
|
itemsProcessed++; |
|
|
itemsProcessed++; |
|
|
} |
|
|
} |
|
|