update #42
@ -125,10 +125,10 @@ async def baidu_sms_kafka_consumer(ns={}):
|
|||||||
# total_count = 0
|
# total_count = 0
|
||||||
while True:
|
while True:
|
||||||
i = 0
|
i = 0
|
||||||
# if i == 0:
|
if i == 0:
|
||||||
# # 写入文件记录轮询开始时间 时间格式: YYYY-MM-DD HH:MM:SS
|
# 写入文件记录轮询开始时间 时间格式: YYYY-MM-DD HH:MM:SS
|
||||||
# with open('baidu_kafka_msg.txt', 'a', encoding='utf-8') as f:
|
with open('baidu_kafka_msg.txt', 'a', encoding='utf-8') as f:
|
||||||
# f.write(f"轮询开始时间:{datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n")
|
f.write(f"轮询开始时间:{datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n")
|
||||||
|
|
||||||
msg = consumer.poll(0.1) # 单次轮询获取消息
|
msg = consumer.poll(0.1) # 单次轮询获取消息
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user