【mongo】查詢超時處理

使用no_cursor_timeoutpython

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