From 4a670de26bb692202054baec7487f2ccac2e1b3f Mon Sep 17 00:00:00 2001 From: wuaho Date: Sat, 18 Sep 2021 10:09:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=81=9C=E6=AD=A2=E6=B6=88=E8=B4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index 332f4ba..1a3ac66 100644 --- a/app.py +++ b/app.py @@ -54,15 +54,16 @@ class XProcess(Process): elif type_ == settings.STOP_SIGNAL: # continue # 1 小时内有效 + self.log.info(type_) if msg.get('#time', 0) + 3600 < int(time.time()): continue kafka_client.close() # 停止消费kafka - print(f'进程{self.partition} 等待90秒') + self.log.info(f'进程{self.partition} 等待90秒') time.sleep(90) - print(f'进程{self.partition} 写入数据') + self.log.info(f'进程{self.partition} 写入数据') transmitter.run() - print(f'进程{self.partition} 结束') + self.log.info(f'进程{self.partition} 结束') break else: @@ -72,4 +73,4 @@ class XProcess(Process): while True: time.sleep(5) - print(f'消费分区{self.partition} 已结束。。。') + self.log.info(f'消费分区{self.partition} 已结束。。。')