Browse Source

新框架 bug 暂停

罗俊辉 1 năm trước cách đây
mục cha
commit
3771763d73
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      app/main.py

+ 4 - 2
app/main.py

@@ -5,6 +5,7 @@ description: 票圈线上代码控制程序,分布式抓取消费核心
 """
 import asyncio
 import json
+import time
 
 from mq_http_sdk.mq_consumer import *
 from mq_http_sdk.mq_exception import MQExceptionBase
@@ -87,9 +88,10 @@ async def main():
     while spider_list:
         # print("Hello World {}".format(" ".join(spider_list)))
         async_tasks = []
-        print(spider_list)
+        # print(spider_list)
         for spider in spider_list:
-            print(spider)
+            print(json.dumps(spider))
+        time.sleep(1000)
     #         task = asyncio.create_task(consume_single_message(spider))
     #         async_tasks.append(task)
     #     await asyncio.gather(*async_tasks)