Skip to content

fix(todos): 플래너 채팅 비동기 폴링 구조로 변경 - #93

Merged
bigmooon merged 1 commit into
mainfrom
fix/todos-async-poll
Jun 29, 2026
Merged

bigmooon merged 1 commit into
mainfrom
fix/todos-async-poll

Conversation

@areum117

Copy link
Copy Markdown
Collaborator

Summary

  • 플랜 생성은 RunPod/LLM 호출 시간이 길어질 수 있는데, 기존 구조는 Django 요청 하나가 결과가 나올 때까지 대기했습니다. 이 때문에 Cloudflare/nginx timeout이 먼저 발생해 504가 나고, 프론트에서는 플랜 생성 실패로 보였습니다.

Changes

  • POST /api/v1/todos/chat/이 AI 결과를 끝까지 기다리지 않고 202 pending + job_id를 반환하도록 변경했습니다.
  • GET /api/v1/todos/chat/{job_id}/ 폴링 endpoint를 추가했습니다.
  • TodoAIClient에 submit_chat() / poll_chat()을 분리했습니다.
  • AI 서버의 하이픈 없는 job id도 처리할 수 있도록 Django route를 <str:job_id>로 구성했습니다.
  • 관련 API flow 문서와 테스트를 갱신했습니다.

Checklist

  • Django app/module boundaries are respected (apps/, common/, config/, infrastructure/)
  • Settings use config.settings.*
  • Migrations are included or not needed
  • API behavior, serializers, permissions, or validation changes are documented
  • Tests are added/updated or the reason is noted

Test

  • make test
  • make lint
  • Manual check:

Notes

@bigmooon
bigmooon merged commit 0f00160 into main Jun 29, 2026
1 check passed
@bigmooon
bigmooon deleted the fix/todos-async-poll branch July 5, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants