|
|
@ -393,7 +393,7 @@ cors(corsOptions), (req, res, next) => { |
|
|
|
// socket
|
|
|
|
// ***************************************************
|
|
|
|
|
|
|
|
io.origins('*:*') // for latest version
|
|
|
|
iolog.origins('*:*') // for latest version
|
|
|
|
|
|
|
|
|
|
|
|
function onCollection(err, collection) { |
|
|
@ -409,7 +409,7 @@ function onCollection(err, collection) { |
|
|
|
var now = new Date(); |
|
|
|
cursor.on('data', function (data) { |
|
|
|
console.log('+++++++++ondata<<<<<<<<<<<<<<<<<<<<<<' + data); |
|
|
|
io.in('anagnostopoulos@uniwa.gr').emit("logdata", data); |
|
|
|
iolog.in('anagnostopoulos@uniwa.gr').emit("logdata", data); |
|
|
|
|
|
|
|
var pathfileval = pathmodule.basename(data.tailed_path); |
|
|
|
var arrfile = pathfileval.toString().split("-"); |
|
|
@ -450,7 +450,7 @@ function onCollection(err, collection) { |
|
|
|
console.log('datauser ' + JSON.stringify(user)); |
|
|
|
//io.in(user).emit("logdata", reslog);
|
|
|
|
var user = 'anagnostopoulos@uniwa.gr' |
|
|
|
io.in(user).emit("logdata", reslog); |
|
|
|
iolog.in(user).emit("logdata", reslog); |
|
|
|
itemsProcessed++; |
|
|
|
})() |
|
|
|
}else{ |
|
|
@ -470,7 +470,7 @@ function onCollection(err, collection) { |
|
|
|
|
|
|
|
console.log('>>>>>>>>>>2222222222222>>>>>>>>>>>>>>>>>>>>>>>>>>>>> '+JSON.stringify(object)); |
|
|
|
var user = object.user25user |
|
|
|
io.in(user).emit("logdata", reslog); |
|
|
|
iolog.in(user).emit("logdata", reslog); |
|
|
|
itemsProcessed++; |
|
|
|
}); |
|
|
|
} |
|
|
@ -503,7 +503,8 @@ function onCollection(err, collection) { |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
io.on('connection', s => { |
|
|
|
var iolog = io.of('/logs'); |
|
|
|
iolog.on('connection', s => { |
|
|
|
console.error('socket connection'); |
|
|
|
|
|
|
|
// ------------------------------
|
|
|
|