zhangyong 4 달 전
부모
커밋
87b6adb450
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      app/main.py

+ 2 - 1
app/main.py

@@ -50,6 +50,7 @@ async def consume_single_message(spider):
     consumer = get_consumer(topic, group)
     try:
         messages = consumer.consume_message(wait_seconds=10, batch_size=1)
+        print(messages)
         if messages:
             # 在这里消费消息,做一些数据处理分析
             for single_message in messages:
@@ -88,7 +89,7 @@ async def main():
     """
     spider_list = TopicGroup().produce()
     while spider_list:
-        print(spider_list)
+        # print(spider_list)
         tasks = [consume_single_message(spider) for spider in spider_list]
         await asyncio.gather(*tasks)
         await asyncio.sleep(20)