Przeglądaj źródła

score_list接口

罗俊辉 11 miesięcy temu
rodzic
commit
3a8dac0674
2 zmienionych plików z 3 dodań i 3 usunięć
  1. 2 2
      routes/accountServer.py
  2. 1 1
      test/nlp_dev.py

+ 2 - 2
routes/accountServer.py

@@ -23,7 +23,7 @@ class AccountServer(object):
         self.params = params
         self.AT = ArticleDBTools(mysql_client)
 
-    def request_for_nlp(self, title_list, account_interest, account_weight):
+    async def request_for_nlp(self, title_list, account_interest, account_weight):
         """
         nlp process
         """
@@ -111,7 +111,7 @@ class AccountServer(object):
             method=self.interest_type,
             rate=self.rate
         )
-        response = self.request_for_nlp(
+        response = await self.request_for_nlp(
             title_list=self.title_list,
             account_interest=account_interest,
             account_weight=account_weight,

+ 1 - 1
test/nlp_dev.py

@@ -192,7 +192,7 @@ def test_request(url):
     print(b - a)
 
 
-url_list = ["http://localhost:6060/nlp"]
+url_list = ["http://47.98.154.124:6060/nlp"]
 test_request(url_list[0])
 # with ThreadPoolExecutor(max_workers=3) as Pool:
 #     Pool.map(test_request, url_list)