改为手动提交
This commit is contained in:
parent
e33a22d1d4
commit
19c64b5801
3
app.py
3
app.py
@ -69,14 +69,13 @@ class XProcess(Process):
|
|||||||
self.log.info(type_)
|
self.log.info(type_)
|
||||||
if data.get('#time', 0) + 3600 < int(time.time()):
|
if data.get('#time', 0) + 3600 < int(time.time()):
|
||||||
continue
|
continue
|
||||||
kafka_client.commit()
|
|
||||||
kafka_client.close()
|
|
||||||
# 停止消费kafka
|
# 停止消费kafka
|
||||||
self.log.info(f'进程{self.partition} 等待90秒')
|
self.log.info(f'进程{self.partition} 等待90秒')
|
||||||
time.sleep(90)
|
time.sleep(90)
|
||||||
self.log.info(f'进程{self.partition} 写入数据')
|
self.log.info(f'进程{self.partition} 写入数据')
|
||||||
transmitter.run(kafka_client)
|
transmitter.run(kafka_client)
|
||||||
self.log.info(f'进程{self.partition} 结束')
|
self.log.info(f'进程{self.partition} 结束')
|
||||||
|
kafka_client.close()
|
||||||
|
|
||||||
break
|
break
|
||||||
elif type_ == 'test':
|
elif type_ == 'test':
|
||||||
|
Loading…
Reference in New Issue
Block a user