marxjaw 1 maand geleden
bovenliggende
commit
c531b9b451

+ 1 - 1
yt-agent/agent-service/src/main/java/com/ytpm/controller/AgentIndexController.java

@@ -95,7 +95,7 @@ public class AgentIndexController {
         List<YtPlatformUserApp> appList = issuedAppList.getData();
         List<String> appIdList = agentAppService.getApkIdList(userInfo.getUserId());
         List<String> serveList = appList.stream().map(YtPlatformUserApp::getServiceName).distinct().collect(Collectors.toList());
-        CountDownLatch countDownLatch = new CountDownLatch(appList.size());
+        CountDownLatch countDownLatch = new CountDownLatch(serveList.size());
         for (String serve : serveList) {
             AgentTopCountView one = invokData(serve, appIdList,countDownLatch);
             adCount += one.getAdCount();

+ 4 - 1
yt-risk/risk-manage/src/main/java/com/ytpm/util/FeignClientInvoker.java

@@ -31,13 +31,16 @@ public class FeignClientInvoker {
     @Value("${risk.feign.max-concurrent:50}")
     private int maxConcurrent;
     private Semaphore bulkhead;
-    @Resource
+    @Resource(name = "riskScheduledExecutorService")
     private ScheduledExecutorService scheduledExecutorService;
 
     public FeignClientInvoker(ApplicationContext applicationContext) {
         this.applicationContext = applicationContext;
     }
 
+    /**
+     * 初始化许可证,采用公平锁竞争
+     */
     @PostConstruct
     public void init() {
         this.bulkhead = new Semaphore(Math.max(1, maxConcurrent), true);