wangyunpeng 7 mesi fa
parent
commit
59e8b964d1

+ 1 - 1
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/common/HttpPoolFactory.java

@@ -14,7 +14,7 @@ public final class HttpPoolFactory {
             HttpClientFactory.create(60000, 60000, 200, 200, 0, 60000);
 
     private static CloseableHttpClient NLP =
-            HttpClientFactory.create(15000, 15000, 200, 200, 0, 15000);
+            HttpClientFactory.create(30000, 30000, 200, 200, 0, 30000);
 
     private static CloseableHttpClient ThirtySecond =
             HttpClientFactory.create(30000, 30000, 200, 200, 0, 30000);

+ 1 - 1
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/remote/NLPRemoteService.java

@@ -68,7 +68,7 @@ public class NLPRemoteService {
             bodyParam.put("min_time", accountScoreMinTimeMap.get(accountName));
         }
         int retry = 0;
-        while (retry < 3) {
+        while (retry < 2) {
             retry++;
             try {
                 HttpPost httpPost = new HttpPost(url);

+ 1 - 1
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/score/strategy/SimilarityStrategy.java

@@ -74,7 +74,7 @@ public class SimilarityStrategy implements ScoreStrategy {
                         try {
                             type = kimiResult.getResponse().getChoices().get(0).getMessage().getContent();
                             log.info("SimilarityStrategy kimiResultType:{}", type);
-                            redisTemplate.opsForValue().set(redisKey, type, 2L, TimeUnit.HOURS);
+                            redisTemplate.opsForValue().set(redisKey, type, 10L, TimeUnit.DAYS);
                         } catch (Exception e) {
                             log.error(kimiResult.getResponse().getChoices().get(0).getMessage().getContent());
                         }