使用no_cursor_timeout
collection = self.db[tb_name]
cols = collection.find(no_cursor_timeout=True)
for col in cols:
# do something
cols.close()
使用no_cursor_timeoutcollection = self.db[tb_name]cols = collection.find(no_cursor_timeout=True)for col in cols:# do somethingco...
使用no_cursor_timeout
collection = self.db[tb_name]
cols = collection.find(no_cursor_timeout=True)
for col in cols:
# do something
cols.close()
转载于:https://www.cnblogs.com/dplearning/p/9577993.html
更多推荐
所有评论(0)