Compare commits
No commits in common. "9e5d0466608f8828509af842581263ececed0766" and "d62737332e5381645a7aa2f6e686d999e2450961" have entirely different histories.
9e5d046660
...
d62737332e
@ -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