引擎逻辑修改

This commit is contained in:
even 2025-05-30 12:53:21 +08:00
parent 00a172715f
commit 82f1aaa72f
4 changed files with 9 additions and 9 deletions

View File

@ -13,7 +13,7 @@ public class ExecutorConfig {
@Bean("parallelExecutor")
public ThreadPoolTaskExecutor pipelineExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(5);
executor.setCorePoolSize(10);
executor.setMaxPoolSize(10);
executor.setQueueCapacity(100);
executor.setThreadNamePrefix("Parallel-");
@ -25,7 +25,7 @@ public class ExecutorConfig {
@Bean("serialExecutor")
public ThreadPoolTaskExecutor serialExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(5);
executor.setCorePoolSize(10);
executor.setMaxPoolSize(10);
executor.setQueueCapacity(100);
executor.setThreadNamePrefix("Serial-");
@ -37,7 +37,7 @@ public class ExecutorConfig {
@Bean("workerExecutor")
public ThreadPoolTaskExecutor workerExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(5);
executor.setCorePoolSize(10);
executor.setMaxPoolSize(10);
executor.setQueueCapacity(100);
executor.setThreadNamePrefix("Worker-");

View File

@ -61,10 +61,10 @@ public class ParallelDispatcher implements BaseDispatcher{
latch.await();
// TODO 检查是否全部执行成功 目前没有逻辑就是忽略错误
// 当前执行失败
while (pipelineRunContext.getState().get() != ContextStateEnum.RUNNING.getCode()) {
// 想办法借助工具类 或者直接wait
pipelineRunContext.pause();
}
// while (pipelineRunContext.getState().get() != ContextStateEnum.RUNNING.getCode()) {
// // 想办法借助工具类 或者直接wait
// pipelineRunContext.pause();
// }
}
}
@Override

View File

@ -51,7 +51,7 @@ public class SerialDispatcher implements BaseDispatcher {
AtomicInteger state = taskRunContext.getState();
// 如果不为正常执行成功就暂时阻塞直到有状态更改
while (state.get() != ContextStateEnum.HAPPY_ENDING.getCode()
// && state.get() != ContextStateEnum.BAD_ENDING.getCode()
&& state.get() != ContextStateEnum.BAD_ENDING.getCode()
) {
// Thread.sleep(1000L);
taskRunContext.pause();

View File

@ -43,7 +43,7 @@ public class TestCaseGenerationWorker extends SshWorker {
//获取机器
MachineInfo machineInfoDO = this.getMachineInfoService().getById(machineId);
statusCode = shell(machineInfoDO, null, context,
statusCode = shell(machineInfoDO, CryptogramUtil.doDecrypt(machineInfoDO.getPassword()), context,
"echo \"自定义镜像执行命令\"",
commandScript
);