|
|
@@ -36,7 +36,7 @@ import java.util.concurrent.TimeUnit;
|
|
|
@Service
|
|
|
public class BuildAppImpl implements BuildApp {
|
|
|
private final IdGenerator idGenerator = new IdGenerator(10, "build-log-id");
|
|
|
- private final ExecutorService threadPool = ThreadPoolWrapper.threadPool("build-pool", 10);
|
|
|
+ private final ExecutorService buildPool = ThreadPoolWrapper.threadPool("build", 10);
|
|
|
private final Map<String, AppTask> taskMap = new HashMap<>(10);
|
|
|
private final AppBuildService appBuildService;
|
|
|
private final AppBuildQuery appBuildQuery;
|
|
|
@@ -87,7 +87,7 @@ public class BuildAppImpl implements BuildApp {
|
|
|
String appId = appDto.getAppId();
|
|
|
log.info("{} 开始异步构建", appId);
|
|
|
appBuildService.updateBeforeBuild(appId, buildBy);
|
|
|
- CompletableFuture<HandlerResult> future = CompletableFuture.supplyAsync(buildChain, threadPool)
|
|
|
+ CompletableFuture<HandlerResult> future = CompletableFuture.supplyAsync(buildChain, buildPool)
|
|
|
.whenComplete((chainResult, throwable) -> {
|
|
|
BuildChainResult buildChainResult = (BuildChainResult) chainResult;
|
|
|
Result result = buildChainResult.getResult();
|
|
|
@@ -109,7 +109,7 @@ public class BuildAppImpl implements BuildApp {
|
|
|
|
|
|
@Override
|
|
|
public List<BuildTask> getBuildTasks() {
|
|
|
- ThreadPoolExecutor tpe = (ThreadPoolExecutor) threadPool;
|
|
|
+ ThreadPoolExecutor tpe = (ThreadPoolExecutor) buildPool;
|
|
|
int active = tpe.getActiveCount();
|
|
|
long total = tpe.getTaskCount();
|
|
|
log.info("total -> {}, active -> {}", total, active);
|