Skip to content

Commit fb8eba2

Browse files
committed
fix: docker compose redis설정 변경
1 parent 871a4ab commit fb8eba2

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ services:
66
container_name: redis
77
command: ["redis-server", "--maxmemory", "256mb", "--maxmemory-policy", "allkeys-lru"]
88
restart: always
9+
ports:
10+
- "6379:6379"
911
networks:
1012
- foss-net
1113

src/main/java/Capstone/FOSSistant/global/service/customAI/AIClassifierClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public Mono<String> classifyBatch(List<String[]> titleBodyList) {
106106
.bodyValue(payload)
107107
.retrieve()
108108
.bodyToMono(String.class)
109-
.timeout(Duration.ofSeconds(50))
109+
.timeout(Duration.ofSeconds(60))
110110
.doOnSuccess( result -> {
111111
long end = System.currentTimeMillis();
112112
log.info("[AI Batch API 호출 + 응답 수신 시간] {}ms", (end - start));

src/main/java/Capstone/FOSSistant/global/service/customAI/IssueListServiceImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public CompletableFuture<DifficultyResult> classifyWithAI(String title, String b
216216
long start = System.currentTimeMillis();
217217

218218
return aiClassifierClient.classify(title, body)
219-
.timeout(Duration.ofSeconds(50))
219+
.timeout(Duration.ofSeconds(60))
220220
.onErrorResume(TimeoutException.class, e -> {
221221
log.error("[NETWORK] AI 호출 타임아웃: {}ms — {}", System.currentTimeMillis()-start, title, e);
222222
return aiClassifierClient.defaultSingleResult();
@@ -264,7 +264,7 @@ public CompletableFuture<DifficultyResult> classifyWithAI(String title, String b
264264
private CompletableFuture<List<Tag>> classifyWithAIBatch(List<String[]> titleBodyList) {
265265
// (1) WebClient 논블로킹 배치 호출 → Mono<String> → toFuture() → CompletableFuture<String>
266266
CompletableFuture<String> monoFuture = aiClassifierClient.classifyBatch(titleBodyList)
267-
.timeout(Duration.ofSeconds(30))
267+
.timeout(Duration.ofSeconds(60))
268268
// 에러 시 기본 JSON 반환
269269
.onErrorResume(e -> aiClassifierClient.defaultBatchResult())
270270
.toFuture();

0 commit comments

Comments
 (0)