【mongo】查询超时处理

使用no_cursor_timeout

            collection = self.db[tb_name]
            cols = collection.find(no_cursor_timeout=True)
            for col in cols:
                # do something
            cols.close()

posted @ 2018-09-03 13:33  匡子语  阅读(479)  评论(0编辑  收藏  举报