|
@ -374,12 +374,13 @@ function onCollection(err, collection) { |
|
|
numberOfRetries: -1, |
|
|
numberOfRetries: -1, |
|
|
tailableRetryInterval: 500 |
|
|
tailableRetryInterval: 500 |
|
|
}; |
|
|
}; |
|
|
//collection.find().cursor(options);
|
|
|
var cursor = collection.find().cursor(options); |
|
|
var cursor = collection.find({}, options), |
|
|
//var cursor = collection.find({}, options),
|
|
|
cursorStream = cursor.stream(), |
|
|
// cursorStream = cursor.stream(),
|
|
|
itemsProcessed = 0; |
|
|
// itemsProcessed = 0;
|
|
|
|
|
|
|
|
|
cursorStream.on('data', function (data) { |
|
|
//cursorStream.on('data', function (data) {
|
|
|
|
|
|
cursor.on('data', function (data) { |
|
|
console.log(data.value); |
|
|
console.log(data.value); |
|
|
itemsProcessed++; |
|
|
itemsProcessed++; |
|
|
}); |
|
|
}); |
|
|