fix: Whisper 전사 제한 시간 확대

This commit is contained in:
hehihoho3@gmail.com 2026-08-13 15:23:43 +09:00
parent f51cab471e
commit f0ef7c32ff
2 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,7 @@
package com.hlab.yanalyst.global.config;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
@ -28,10 +29,13 @@ public class RestTemplateConfig {
* (주입 이름 {@code pythonRestTemplate} 구분 다른 곳의 restTemplate 주입에는 영향 없음)
*/
@Bean
public RestTemplate pythonRestTemplate(RestTemplateBuilder builder) {
public RestTemplate pythonRestTemplate(
RestTemplateBuilder builder,
@Value("${python.connect-timeout-seconds:20}") long connectTimeoutSeconds,
@Value("${python.read-timeout-minutes:30}") long readTimeoutMinutes) {
return builder
.connectTimeout(Duration.ofSeconds(20))
.readTimeout(Duration.ofMinutes(10))
.connectTimeout(Duration.ofSeconds(connectTimeoutSeconds))
.readTimeout(Duration.ofMinutes(readTimeoutMinutes))
.build();
}

View File

@ -54,6 +54,8 @@ youtube:
# Python 마이크로서비스(자막 /transcript, Whisper 전사 /transcribe). 동일 호스트면 http://localhost:8000 로 오버라이드.
python:
base-url: ${PYTHON_BASE_URL:http://h-python.tolag.shop}
connect-timeout-seconds: ${PYTHON_CONNECT_TIMEOUT_SECONDS:20}
read-timeout-minutes: ${PYTHON_READ_TIMEOUT_MINUTES:30} # 긴 영상 Whisper 전사·렌더 응답 대기
# yt-dlp 원본 다운로드(로컬 ProcessBuilder 실행). 재가공 '원본 다운로드' 버튼이 사용.
ytdlp: