|
@ -404,11 +404,16 @@ function onCollection(err, collection) { |
|
|
// cursorStream = cursor.stream(),
|
|
|
// cursorStream = cursor.stream(),
|
|
|
var itemsProcessed = 0; |
|
|
var itemsProcessed = 0; |
|
|
|
|
|
|
|
|
|
|
|
var reslog = new Object(); |
|
|
|
|
|
var now = new Date(); |
|
|
//cursorStream.on('data', function (data) {
|
|
|
//cursorStream.on('data', function (data) {
|
|
|
cursor.on('data', function (data) { |
|
|
cursor.on('data', function (data) { |
|
|
|
|
|
reslog.log = data |
|
|
|
|
|
reslog.date = convertDateToUTC(now) |
|
|
console.log('data ' + data.value); |
|
|
console.log('data ' + data.value); |
|
|
var user = "anagnostopoulos@uniwa.gr" |
|
|
var user = "anagnostopoulos@uniwa.gr" |
|
|
io.in(user).emit("logdata", data.value); |
|
|
//io.in(user).emit("logdata", data.value);
|
|
|
|
|
|
io.in(user).emit("logdata", reslog); |
|
|
itemsProcessed++; |
|
|
itemsProcessed++; |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|