【mongo】查询超时处理

使用no_cursor_timeout

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

猜你喜欢

转载自www.cnblogs.com/dplearning/p/9577993.html