, pymongo: CursorNotFound: Cursor not found, cursor id. , , , pymongo .
FAQ pymongo : .
- , , .
client = MongoClient("localhost")
db = client.testdatabase
cursor = db.testcollection.find({}, no_cursor_timeout=True)
find() , :
cursor_type (): . CursorType:
- NON_TAILABLE - .
- TAILABLE - - . , , , . . . .
- TAILABLE_AWAIT - . , , .
- EXHAUST - the result of this search will be the exhaust cursor. MongoDB will transmit the results to the client, without waiting for the client to request each batch, reducing latency. See notes to below.
Update: after use, no_cursor_timeoutI was wondering what happened to the cursor when they were not executed. Here is the answer: PyMongo: what happens to the cursor when no_cursor_timeout = True
source
share