ソースを参照

v1.0
服务上线

罗俊辉 1 年間 前
コミット
77a5ccc19f
3 ファイル変更4 行追加2 行削除
  1. 1 1
      applications/migrate.py
  2. 1 0
      deal/matchArticle_deal.py
  3. 2 1
      test/matchArticle_dev.py

+ 1 - 1
applications/migrate.py

@@ -26,7 +26,7 @@ def migrate_daily(dt):
     print("{} successfully insert {} rows, totally cost {} seconds".format(dt, len(data), b - a))
 
 
-dt_list = generate_daily_strings("20240617", "20240617")
+dt_list = generate_daily_strings("20240618", "20240618")
 for dt in dt_list:
     print(dt)
     migrate_daily(dt)

+ 1 - 0
deal/matchArticle_deal.py

@@ -147,6 +147,7 @@ class MatchArticlesV1(object):
                 ({self.video_id}, '{request_id}', '{self.title}', {request_time})
         """
         await self.mysql_client.async_insert(sql=insert_sql)
+        return request_id
 
     async def deal(self):
         """

+ 2 - 1
test/matchArticle_dev.py

@@ -5,7 +5,7 @@ import json
 import time
 import requests
 
-url = "http://localhost:8888/matchArticle"
+url = "http://47.99.132.47:8888/matchArticleV1"
 
 body = {
     "videoId": "21006075",
@@ -20,4 +20,5 @@ header = {
 response = requests.post(url, json=body, headers=header, timeout=600)
 b = time.time()
 print(b - a)
+print(response.text)
 print(json.dumps(response.json(), ensure_ascii=False, indent=4))