Details
-
Task
-
Resolution: Won't Fix
-
Major - P3
-
None
-
None
-
None
Description
This example kind of works but is missing the handling of a dead cursor:
var coll = db.myCappedCollection;
var startDoc = coll.find().hint(
).limit(1).next();
var lastValue = startDoc['insertDate'];
printjson(startDoc)
var cursor = coll.find( { 'insertDate' :
}
).hint(
).addOption( DBQuery.Option.tailable ).addOption( DBQuery.Option.awaitData );
while (1) {
try {
if ( cursor.hasNext() )
} catch (e)
{ break; }}