Commit 5c46ae1e by chenyuanjie

fix

parent 86b1bbf4
...@@ -348,9 +348,6 @@ class Templates(object): ...@@ -348,9 +348,6 @@ class Templates(object):
def _do_stop(): def _do_stop():
try: try:
if self.query is not None: if self.query is not None:
# 先把调用时刻Kafka里已经存在但还没被消费的积压全部跑完,再停,
# 避免爬虫刚标记完成、但还有一截尾巴数据没被下一次触发扫到就被stop掉
self.query.processAllAvailable()
self.query.stop() # 在子线程中调用,避免 foreachBatch 回调内死锁 self.query.stop() # 在子线程中调用,避免 foreachBatch 回调内死锁
if self.spark is not None: if self.spark is not None:
self.spark.stop() self.spark.stop()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment