[Exec] modify sync and async execution function

This commit is contained in:
zeaslity
2023-06-15 10:37:45 +08:00
parent e6c71612aa
commit ec3d5bba1e
20 changed files with 668 additions and 654 deletions

View File

@@ -4,7 +4,7 @@ package io.wdd.rpc.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.wdd.common.response.R;
import io.wdd.rpc.init.ServerCacheAgentStatus;
import io.wdd.rpc.init.AgentStatusCacheService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -14,7 +14,7 @@ import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import static io.wdd.rpc.init.ServerCacheAgentStatus.*;
import static io.wdd.rpc.init.AgentStatusCacheService.*;
@RestController
@@ -23,7 +23,7 @@ import static io.wdd.rpc.init.ServerCacheAgentStatus.*;
public class StatusController {
@Resource
ServerCacheAgentStatus serverCacheAgentStatus;
AgentStatusCacheService agentStatusCacheService;
@ApiOperation("[ Agent-状态 ] Map")
@GetMapping("/agent/status")
@@ -76,7 +76,7 @@ public class StatusController {
public R<Map<String, List<String>>> ManualUpdateAgentStatus() {
// 手动调用更新
serverCacheAgentStatus.updateAgentStatusMapCache();
agentStatusCacheService.updateAgentStatusMapCache();
return R.ok(STATUS_AGENT_LIST_MAP);
}