Commit graph

5 commits

Author SHA1 Message Date
2fec6c552d feat: 봇 일정 추가 시 Meilisearch 실시간 동기화
- syncScheduleById 함수 추가: 개별 일정 동기화
- YouTube 봇: 영상 추가 시 Meilisearch 동기화
- X 봇: 트윗/유튜브 링크 추가 시 Meilisearch 동기화
- description 컬럼 제거 (schedules 테이블에 없음)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 11:26:32 +09:00
4edef16310 fix: 일정 저장/삭제에 트랜잭션 적용
- youtube/index.js: saveVideo에 withTransaction 적용
- x/index.js: saveTweet, saveYoutubeFromTweet에 withTransaction 적용
- schedules/index.js: DELETE 핸들러에 withTransaction 적용
- 중간 실패 시 자동 롤백으로 데이터 무결성 보장
- docs/improvements.md 문서 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:21:56 +09:00
7593004bd6 refactor(backend): 중복 코드 제거
- scheduler.js: handleSyncResult 함수 추출로 동기화 결과 처리 로직 통합
- youtube/index.js: 하드코딩된 카테고리 ID를 CATEGORY_IDS 상수로 변경
- 리팩토링 문서 업데이트

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 13:45:08 +09:00
c7b0a51924 feat: YouTube API 할당량 절감을 위한 playlist ID 캐싱
- uploads playlist ID를 Redis에 영구 캐싱 (불변값)
- 일일 API 사용량 6,480 → 4,320 units (33% 절감)
- 문서 업데이트 (컨테이너 분리 구조, X source.name 빈 문자열)
- CLAUDE.md에 문서 업데이트 필수 안내 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 12:32:04 +09:00
19ba8bcddf refactor: Express에서 Fastify로 백엔드 마이그레이션
- Express → Fastify 5 프레임워크 전환
- 플러그인 기반 아키텍처로 재구성
  - plugins/db.js: MariaDB 연결 풀
  - plugins/redis.js: Redis 클라이언트
  - plugins/scheduler.js: 봇 스케줄러 (node-cron)
- 봇 설정 방식 변경: DB 테이블 → 설정 파일 (config/bots.js)
- 봇 상태 저장: DB → Redis
- YouTube/X 봇 서비스 분리 및 개선
- 날짜 유틸리티 KST 변환 수정
- 미사용 환경변수 정리

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 21:11:02 +09:00