From 25392daeded0467a8af99996be088022e68182ff Mon Sep 17 00:00:00 2001 From: wuaho Date: Tue, 26 Oct 2021 11:20:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=89=8B=E5=8A=A8=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 2 +- settings.py.template | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index ef8733a..15fe886 100644 --- a/app.py +++ b/app.py @@ -70,7 +70,7 @@ class XProcess(Process): self.log.info(f'进程{self.partition} 等待90秒') time.sleep(90) self.log.info(f'进程{self.partition} 写入数据') - transmitter.run() + transmitter.run(kafka_client) self.log.info(f'进程{self.partition} 结束') break diff --git a/settings.py.template b/settings.py.template index bd8b9c8..f7f0a85 100644 --- a/settings.py.template +++ b/settings.py.template @@ -17,8 +17,9 @@ class Config: 'bootstrap_servers': ["192.168.0.30:9092", "192.168.0.71:9092", "192.168.0.229:9092"], 'value_deserializer': json.loads, 'auto_offset_reset': 'earliest', - 'enable_auto_commit': True, - 'auto_commit_interval_ms': 10000, + 'enable_auto_commit': False, + 'max_poll_interval_ms': 3600000, + # 'auto_commit_interval_ms': 10000, # 每个游戏不一样 # *************