Browse Source

2024-10-22 debug

luojunhui 6 months ago
parent
commit
132eea9227
3 changed files with 4 additions and 1 deletions
  1. 1 0
      applications/functions/common.py
  2. 2 0
      applications/schedule/search_schedule.py
  3. 1 1
      static/config.py

+ 1 - 0
applications/functions/common.py

@@ -225,6 +225,7 @@ async def request_etl(url, headers, json_data, retries=6):
         for attempt in range(retries):
             try:
                 async with session.post(url, headers=headers, json=json_data, timeout=120) as response:
+                    print("请求状态码", response.status)
                     return await response.json()
             except asyncio.TimeoutError:
                 if attempt < retries - 1:

+ 2 - 0
applications/schedule/search_schedule.py

@@ -279,11 +279,13 @@ async def video_sender(video_obj, user, trace_id, platform, content_id):
     header = {
         "Content-Type": "application/json",
     }
+    print(mq_obj)
     response = await request_etl(
         url="http://192.168.203.137:4612/etl",
         headers=header,
         json_data=mq_obj
     )
+    print(response)
     return response
     # response = await request_etl(
     #     url="http://localhost:4612/etl",

+ 1 - 1
static/config.py

@@ -987,7 +987,7 @@ db_video = "article_match_videos"
 # db_video = "article_match_videos_dev"
 
 # spider coroutines
-spider_coroutines = 10
+spider_coroutines = 1
 
 # mysql coroutines
 mysql_coroutines = 100