update tmq subscript
This commit is contained in:
parent
e1ca6a5e9c
commit
f4aedc9ec2
|
@ -1374,6 +1374,7 @@ class Task():
|
||||||
0x707, # Query not ready
|
0x707, # Query not ready
|
||||||
0x396, # Database in creating status
|
0x396, # Database in creating status
|
||||||
0x386, # Database in droping status
|
0x386, # Database in droping status
|
||||||
|
0x03E1, # failed on tmq_subscribe ,topic not exist
|
||||||
|
|
||||||
|
|
||||||
1000 # REST catch-all error
|
1000 # REST catch-all error
|
||||||
|
@ -2053,7 +2054,10 @@ class TdSuperTable:
|
||||||
topic_list = TaosTmqList()
|
topic_list = TaosTmqList()
|
||||||
for topic in current_topic_list:
|
for topic in current_topic_list:
|
||||||
topic_list.append(topic)
|
topic_list.append(topic)
|
||||||
|
try:
|
||||||
consumer.subscribe(topic_list)
|
consumer.subscribe(topic_list)
|
||||||
|
except TmqError as e :
|
||||||
|
pass
|
||||||
time.sleep(5) # consumer work only 5 sec ,and then it will exit
|
time.sleep(5) # consumer work only 5 sec ,and then it will exit
|
||||||
try:
|
try:
|
||||||
consumer.unsubscribe()
|
consumer.unsubscribe()
|
||||||
|
|
Loading…
Reference in New Issue