我在mongodb3.0的collection的find方法中的no_cursor_timeout设置为True,
但是在迭代游标时,还是会抛出CursorNotFound的异常。代码大致如下:
SON = {“username”:”xxx”}
cur = col.find(SON, no_cursor_timeout=True)
for doc in cur:
do_something(doc)
cur.close()
python语言,用的pymongo3.0驱动
我在mongodb3.0的collection的find方法中的no_cursor_timeout设置为True,
但是在迭代游标时,还是会抛出CursorNotFound的异常。代码大致如下:
SON = {“username”:”xxx”}
cur = col.find(SON, no_cursor_timeout=True)
for doc in cur:
do_something(doc)
cur.close()
python语言,用的pymongo3.0驱动
这是什么语言?