추세검색 설정 수정

This commit is contained in:
Macbook
2026-05-27 02:10:00 +09:00
parent 2e08c6b16f
commit fc06a16184
27 changed files with 1262 additions and 147 deletions
@@ -0,0 +1,29 @@
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;
/**
* 추세검색 전용 단일 스레드 실행기 — 메인 API·라이브 전략 스케줄과 분리.
*/
@Configuration
public class TrendSearchSchedulerConfig {
@Bean(name = "trendSearchExecutor")
public Executor trendSearchExecutor(
@Value("${goldenchart.trend-search.scheduler.queue-capacity:16}") int queueCapacity) {
ThreadPoolTaskExecutor ex = new ThreadPoolTaskExecutor();
ex.setThreadNamePrefix("trend-search-");
ex.setCorePoolSize(1);
ex.setMaxPoolSize(1);
ex.setQueueCapacity(queueCapacity);
ex.setWaitForTasksToCompleteOnShutdown(true);
ex.setAwaitTerminationSeconds(30);
ex.initialize();
return ex;
}
}