You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
I Luk Kim 6a98cb2d94 perf: API 성능 개선 — 로그 분석 기반 6개 항목 수정
P0 — 500 에러 대폭 감소 (1.1% → 0.11%)
- price.py / financial.py: except HTTPException: raise 추가 →
  HTTPException(404)이 except Exception에 잡혀 500으로 재포장되던 버그 수정
- real_sec_financial_service: _get_price_data_for_period에 try/except 추가 →
  yfinance 실패가 financial 엔드포인트 500으로 전파되지 않도록 방어
- price.py: TimeoutError 별도 핸들러 추가 → yfinance 타임아웃 시 503 반환

P1 — _store_price_data() N+1 → batch upsert
- price_data_service: 252회 개별 SELECT+INSERT 루프를
  pg_insert(PriceData).on_conflict_do_nothing('uq_price_data') 단일 쿼리로 교체

P2 — financial/data 캐시 TTL 1h → 24h
- financial.py: 재무 데이터는 분기 발표 주기 → _FIN_TTL = 86400

P3 — 과거 가격 데이터 TTL 연장
- price.py: end_date < today-1 이면 TTL=7일, 나머지 1h 유지

P4 — 요청 로그 비동기 배치 처리
- error_logger.py: asyncio.Queue(10_000) 추가, _log_request를 put_nowait으로
  변경 (논블로킹), 백그라운드 _request_log_flusher 코루틴 (1s/100건마다 flush)
- main.py: 앱 시작 시 start_request_log_flusher() 호출

P5 — 누락 DB 인덱스 추가
- financial.py: CalculatedMetrics에 calculation_date, period_date 단독 인덱스
- attention.py: AttentionFeaturesDaily에 ticker 단독 인덱스
- alembic b3c4d5e6f7a8: 위 3개 인덱스 생성 마이그레이션 (idempotent)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5 months ago
..
__init__.py Add Phase 5 Attention Overlay API and fix Redis port mismatch 5 months ago
alpaca_price.py Add Alpaca-specific DB table and Redis caching for Alpaca/FINRA endpoints 5 months ago
attention.py perf: API 성능 개선 — 로그 분석 기반 6개 항목 수정 5 months ago
error_log.py
etf.py
filing.py feat(filings): add accepted_at field to filing search response 5 months ago
financial.py perf: API 성능 개선 — 로그 분석 기반 6개 항목 수정 5 months ago
finra_short_volume.py Add Alpaca-specific DB table and Redis caching for Alpaca/FINRA endpoints 5 months ago
fred_data.py
overlay_feature.py Add Phase 5 Attention Overlay API and fix Redis port mismatch 5 months ago
overlay_raw_event.py Add Phase 5 Attention Overlay API and fix Redis port mismatch 5 months ago
overlay_registry.py Add Phase 5 Attention Overlay API and fix Redis port mismatch 5 months ago
request_log.py