|
@ -406,7 +406,9 @@ function onCollection(err, collection) { |
|
|
|
|
|
|
|
|
//cursorStream.on('data', function (data) {
|
|
|
//cursorStream.on('data', function (data) {
|
|
|
cursor.on('data', function (data) { |
|
|
cursor.on('data', function (data) { |
|
|
console.log(data.value); |
|
|
console.log('data ' + data.value); |
|
|
|
|
|
var user = "anagnostopoulos@uniwa.gr" |
|
|
|
|
|
io.in(user).emit("logdata", reslog); |
|
|
itemsProcessed++; |
|
|
itemsProcessed++; |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
@ -442,7 +444,7 @@ var stream = db.collection('logs').find({}, { |
|
|
}).stream(); |
|
|
}).stream(); |
|
|
|
|
|
|
|
|
stream.on('data', function (doc) { |
|
|
stream.on('data', function (doc) { |
|
|
console.log(JSON.stringify(doc)) |
|
|
console.log('doc ' JSON.stringify(doc)) |
|
|
//socket.write(JSON.stringify({'action': 'log','param': doc.log}));
|
|
|
//socket.write(JSON.stringify({'action': 'log','param': doc.log}));
|
|
|
}); |
|
|
}); |
|
|
/* |
|
|
/* |
|
|