From 413e700b16e9ca67ee02d5489c7e149626acaf84 Mon Sep 17 00:00:00 2001 From: Yang Zhao Date: Wed, 17 Aug 2022 09:21:08 +0800 Subject: [PATCH 1/2] Update _sub_python.mdx --- docs/zh/07-develop/_sub_python.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/zh/07-develop/_sub_python.mdx b/docs/zh/07-develop/_sub_python.mdx index 490b76fca6..1309da5b41 100644 --- a/docs/zh/07-develop/_sub_python.mdx +++ b/docs/zh/07-develop/_sub_python.mdx @@ -1,3 +1,3 @@ ```py -{{#include docs/examples/python/subscribe_demo.py}} -``` \ No newline at end of file +{{#include docs/examples/python/tmq_example.py}} +``` From 09cfd987a620152b694619942c4178ef44401326 Mon Sep 17 00:00:00 2001 From: Yang Zhao Date: Wed, 17 Aug 2022 09:22:45 +0800 Subject: [PATCH 2/2] Update 07-tmq.mdx --- docs/zh/07-develop/07-tmq.mdx | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/docs/zh/07-develop/07-tmq.mdx b/docs/zh/07-develop/07-tmq.mdx index c487835e2d..239a5eacee 100644 --- a/docs/zh/07-develop/07-tmq.mdx +++ b/docs/zh/07-develop/07-tmq.mdx @@ -1116,22 +1116,7 @@ int main(int argc, char* argv[]) { - -```python -import taos -from taos.tmq import TaosConsumer - -import taos -from taos.tmq import * -consumer = TaosConsumer('topic_ctb_column', group_id='vg2') -for msg in consumer: - for row in msg: - print(row) - -``` - -[查看源码](https://github.com/taosdata/TDengine/blob/develop/docs/examples/python/tmq_example.py) - +