Skip to content

Commit 3fced55

Browse files
committed
fix: 프롬프트 길이 수정
1 parent fb8eba2 commit 3fced55

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

src/main/java/Capstone/FOSSistant/FosSistantApplication.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
import org.springframework.boot.SpringApplication;
44
import org.springframework.boot.autoconfigure.SpringBootApplication;
55
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
6+
import org.springframework.scheduling.annotation.EnableAsync;
67

78
@SpringBootApplication
89
@EnableJpaAuditing
10+
@EnableAsync
911
public class FosSistantApplication {
1012

1113
public static void main(String[] args) {

src/main/java/Capstone/FOSSistant/global/config/AsyncConfig.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,26 @@
22

33
import org.springframework.context.annotation.Bean;
44
import org.springframework.context.annotation.Configuration;
5+
import org.springframework.scheduling.annotation.EnableAsync;
56
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
67

78
@Configuration
9+
@EnableAsync // @Async 활성화
810
public class AsyncConfig {
911

1012
@Bean("classifierExecutor")
1113
public ThreadPoolTaskExecutor classifierExecutor() {
1214
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
13-
executor.setCorePoolSize(10); // 최소 10개 스레드 유지
14-
executor.setMaxPoolSize(50); // 최대 50개 스레드까지 확장
15-
executor.setQueueCapacity(100); // 작업 대기 큐 크기
16-
executor.setThreadNamePrefix("AI-Clf-"); // 스레드 이름 접두어
15+
// I/O 바운드: 높은 스레드 수로 대기 지연 최소화
16+
executor.setCorePoolSize(20);
17+
executor.setMaxPoolSize(100);
18+
executor.setQueueCapacity(0); // 큐 대신 바로 스레드 확장
19+
executor.setKeepAliveSeconds(60); // 유휴 스레드 60초 후 정리
20+
executor.setThreadNamePrefix("AI-Clf-");
21+
// 최대치 초과 시 호출 스레드가 직접 처리 → 작업 유실 방지
22+
executor.setRejectedExecutionHandler(
23+
new java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy()
24+
);
1725
executor.initialize();
1826
return executor;
1927
}

src/main/java/Capstone/FOSSistant/global/service/llm/PromptBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public String buildPrompt(String title, String body, String readme, String struc
3232
"difficulty": "easy | medium | hard | misc",
3333
"highlightedBody": "중요한 문장 1개 이상 추출하기"(무조건 그대로 작성하세요, 다른 텍스트 포함하지 마세요, 영어본문이면 영어로 그대로 원문을 넣으세요),
3434
"description": "이슈 설명",
35-
"solution": "이슈 해결 방법(레포지터리바탕으로 어떻게 해결할 것인지 구체적으로 해결책을 주세요 ,이스케이프 문자로 문단 나누기 필요, 마크다운으로 강조)",
35+
"solution": "이슈 해결 방법(레포지터리바탕으로 어떻게 해결할 것인지 해결책을 주세요, 이스케이프 문자로 문단 나누기 필요, 마크다운으로 강조, 매우 길면 안됩니다)",
3636
"relatedLinks": "- [CONTRIBUTING.md](...)\n- [Issue Template](...)"
3737
}
3838
""",

0 commit comments

Comments
 (0)