fix:更新更新时间
This commit is contained in:
@@ -12,7 +12,7 @@ def readKafka():
|
||||
messages = []
|
||||
try:
|
||||
# 读取消息,最多读取10条消息
|
||||
msg = consumer.poll(timeout_ms=500, max_records=50)
|
||||
msg = consumer.poll(timeout_ms=1000, max_records=50)
|
||||
for partition, msgs in msg.items():
|
||||
for message in msgs:
|
||||
messages.append(raw_Data_to_jsonstr(message.value.decode('utf-8')))
|
||||
@@ -44,7 +44,7 @@ def orders_count_by_name():
|
||||
messages = []
|
||||
try:
|
||||
# 读取消息,最多读取10条消息
|
||||
msg = consumer.poll(timeout_ms=500, max_records=50)
|
||||
msg = consumer.poll(timeout_ms=1000, max_records=50)
|
||||
for partition, msgs in msg.items():
|
||||
for message in msgs:
|
||||
jsondata = json.loads(message.value.decode('utf-8'))
|
||||
@@ -66,7 +66,7 @@ def order_name_count():
|
||||
messages = []
|
||||
try:
|
||||
# 读取消息,最多读取10条消息
|
||||
msg = consumer.poll(timeout_ms=500, max_records=50)
|
||||
msg = consumer.poll(timeout_ms=1000, max_records=50)
|
||||
for partition, msgs in msg.items():
|
||||
for message in msgs:
|
||||
jsondata = json.loads(message.value.decode('utf-8'))
|
||||
@@ -88,7 +88,7 @@ def summary():
|
||||
messages = []
|
||||
try:
|
||||
# 读取消息,最多读取10条消息
|
||||
msg = consumer.poll(timeout_ms=500, max_records=50)
|
||||
msg = consumer.poll(timeout_ms=1000, max_records=50)
|
||||
for partition, msgs in msg.items():
|
||||
for message in msgs:
|
||||
jsondata = json.loads(message.value.decode('utf-8'))
|
||||
|
Reference in New Issue
Block a user