提交 a0cf7230 编写于 作者: L Li Ya Qiang

remove port in python example code

上级 0402492d
......@@ -297,13 +297,11 @@ Python programs use the following parameters:
```python
endpoint = os.environ["TDENGINE_CLOUD_ENDPOINT"]
token = os.environ["TDENGINE_CLOUD_TOKEN"]
urlparts = endpoint.split(":", 1)
conf = {
# auth options
"td.connect.websocket.scheme": "wss",
"td.connect.ip": urlparts[0],
"td.connect.port": urlparts[1],
"td.connect.ip": endpoint,
"td.connect.token": token,
# consume options
"group.id": "test_group_py",
......
......@@ -4,13 +4,11 @@ from taosws import Consumer
endpoint = os.environ["TDENGINE_CLOUD_ENDPOINT"]
token = os.environ["TDENGINE_CLOUD_TOKEN"]
urlparts = endpoint.split(":", 1)
conf = {
# auth options
"td.connect.websocket.scheme": "ws",
"td.connect.ip": urlparts[0],
"td.connect.port": urlparts[1],
"td.connect.websocket.scheme": "wss",
"td.connect.ip": endpoint,
"td.connect.token": token,
# consume options
"group.id": "test_group_py",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册