llm 동작 수정
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package com.goldenchart.config;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
/**
|
||||
* 전략평가 AI 검증 — LLM·Ta4j 재평가를 HTTP 요청 스레드와 분리.
|
||||
*/
|
||||
@Configuration
|
||||
public class AiVerifyAsyncConfig {
|
||||
|
||||
@Bean(name = "aiVerifyExecutor")
|
||||
public Executor aiVerifyExecutor(
|
||||
@Value("${goldenchart.llm.ai-verify.pool-size:2}") int poolSize,
|
||||
@Value("${goldenchart.llm.ai-verify.queue-capacity:8}") int queueCapacity) {
|
||||
ThreadPoolTaskExecutor ex = new ThreadPoolTaskExecutor();
|
||||
ex.setThreadNamePrefix("ai-verify-");
|
||||
ex.setCorePoolSize(Math.max(1, poolSize));
|
||||
ex.setMaxPoolSize(Math.max(1, poolSize));
|
||||
ex.setQueueCapacity(queueCapacity);
|
||||
ex.setWaitForTasksToCompleteOnShutdown(true);
|
||||
ex.setAwaitTerminationSeconds(120);
|
||||
ex.initialize();
|
||||
return ex;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user