You need to sign in or sign up before continuing.
提交 f2b43862 编写于 作者: P Ping Xiao

skip some errors

上级 137a9eb6
...@@ -2043,6 +2043,7 @@ class TdSuperTable: ...@@ -2043,6 +2043,7 @@ class TdSuperTable:
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)
# consumer with random work life # consumer with random work life
...@@ -2052,9 +2053,9 @@ class TdSuperTable: ...@@ -2052,9 +2053,9 @@ class TdSuperTable:
consumer.commit(res) consumer.commit(res)
if time.time() - time_start > random.randint(5, 50): if time.time() - time_start > random.randint(5, 50):
break break
try:
consumer.unsubscribe() consumer.unsubscribe()
except TmqError as e: consumer.close()
except TmqError as err: # topic deleted by other threads
pass pass
return return
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册