Here is my mongoose model that retrieves data from the database using a cursor. The cursor has a timeout of 10 minutes as per the documentation.
const cursor = this.importRecordModel.find().cursor()
I attempted to add the following code at the end of the cursor, but due to either typescript or mongoose constraints, it is not included in the list of available functions.
.addCursorFlag('noCursorTimeout', true);