Skip to content

[feat] AI 분석 요청 비동기 처리 적용 #20

@lilloo04

Description

@lilloo04

📌 개요

  • 현재 음성 업로드 API에서 AI 분석 요청이 동기 blocking 방식으로 실행되고 있어 응답 지연 및 timeout 문제가 발생하고 있습니다.
  • 업로드 요청은 즉시 응답하고, AI 분석은 별도 스레드에서 비동기로 처리하도록 구조를 개선합니다.

🔍 상세 내용

  • Spring @Async 기반 비동기 처리 적용
  • AI 분석 요청을 별도 Bean에서 실행하도록 분리
  • 업로드 API는 PROCESSING 상태 저장 후 즉시 응답 반환
  • 비동기 작업에서 AI 서버 요청 수행
  • 성공 시 COMPLETED
  • 실패 시 FAILED + errorMessage 저장
  • 결과 조회 API polling 구조와 연동
  • timeout으로 인한 업로드 실패 문제 개선
  • Lazy Loading/self-invocation 문제 방지

🙋🏻 참고 자료

  • 현재 AI 서버 Endpoint

    • POST /api/v1/analyze
  • 현재 분석 결과 조회 API

  • Spring @Async

  • 현재 timeout 이슈 로그

HttpTimeoutException: Request cancelled
RestTemplate.exchange(...)

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions