-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
helpThis issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessaryThis issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary
Description
{ [MongoError: cursor killed or timed out] name: 'MongoError', message: 'cursor killed or timed out' }
I am using the following code to poll the google docs API. I am polling with around 6k requests so the stream needs to be open for more than 10 minutes (default). I've tried with all the suggested online methods in vain.
Here is the code and please guide me on how to achieve this simple feat.
// create a mongoose stream
let orderstream = Order.find().stream();
// start listening to events on the stream
orderstream.on('data', (doc) => {
// check if data already exists
// add some data
addRow(orderstream, sheet1, doc, 0);
}).on('error', (err) => {
console.log(err);
// send success
// res.json({
// 'status': 'failure'
// });
}).on('close', () => {
// the stream is closed
});
Don't give me the option to use nodejs-native mongodb driver. It works... But I don't wanna include another additional module to achieve what might be possible to be done using mongoose.
Metadata
Metadata
Assignees
Labels
helpThis issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessaryThis issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary