瀏覽代碼

更新apollo配置暂时取消

wangyunpeng 7 月之前
父節點
當前提交
72f431d96a

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

@@ -1,8 +1,6 @@
 package com.tzld.longarticle.recommend.server.service.recommend.score.strategy;
 
-import com.alibaba.fastjson.JSONObject;
 import com.ctrip.framework.apollo.spring.annotation.ApolloJsonValue;
-import com.tzld.longarticle.recommend.server.common.ApolloConfigModifier;
 import com.tzld.longarticle.recommend.server.model.dto.kimi.KimiResult;
 import com.tzld.longarticle.recommend.server.remote.KimiApiService;
 import com.tzld.longarticle.recommend.server.remote.NLPRemoteService;
@@ -84,14 +82,14 @@ public class SimilarityStrategy implements ScoreStrategy {
                 List<String> ghIds = similarityTypeAccountMap.get(type);
                 if (CollectionUtils.isNotEmpty(ghIds)) {
                     ghId = ghIds.get(RandomUtils.nextInt(0, ghIds.size()));
-                    try {
-                        Map<String, String> value = accountSimScoreReplaceMap;
-                        value.put(param.getGhId(), ghId);
-                        ApolloConfigModifier.modifyConfig("account.score.sim.replace", JSONObject.toJSONString(value), env.toUpperCase());
-                        log.info("SimilarityStrategy 更新apollo配置 account.score.sim.replace 成功 {}:{}", param.getGhId(), ghId);
-                    } catch (Exception e) {
-                        log.error("SimilarityStrategy 更新apollo配置失败", e);
-                    }
+//                    try {
+//                        Map<String, String> value = accountSimScoreReplaceMap;
+//                        value.put(param.getGhId(), ghId);
+//                        ApolloConfigModifier.modifyConfig("account.score.sim.replace", JSONObject.toJSONString(value), env.toUpperCase());
+//                        log.info("SimilarityStrategy 更新apollo配置 account.score.sim.replace 成功 {}:{}", param.getGhId(), ghId);
+//                    } catch (Exception e) {
+//                        log.error("SimilarityStrategy 更新apollo配置失败", e);
+//                    }
                 }
                 log.info("SimilarityStrategy 排序账号:{} 替换账号:{}", param.getGhId(), ghId);
             }