@@ -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:
@@ -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",
@@ -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