Skip to content

Commit 5754e9b

Browse files
brody-0125claude
andauthored
Claude/update cleanup threshold w idhz (#15)
* chore: 데이터 cleanup 기준을 7일에서 1일(24시간)로 변경 - cleanup.yml: cutoff를 7 days ago → 1 day ago로 수정 - README.md: cleanup 설명 업데이트 https://claude.ai/code/session_015ddXQKuqnJmz24624oXARA * refactor: 날짜별 디렉토리 구조를 고정 경로(data/realtime/)로 변경 - collect.js: data/YYYY-MM-DD/HH-MM/ 대신 data/realtime/에 덮어쓰기 - build-latest.js: 최신 디렉토리 탐색 로직 제거, 고정 경로에서 읽기 - cleanup.yml 삭제 (더 이상 날짜별 디렉토리가 없으므로 불필요) - collect-realtime.yml: add-paths를 data/realtime/**로 변경 - README.md, CLAUDE.md 업데이트 https://claude.ai/code/session_015ddXQKuqnJmz24624oXARA --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent badc77d commit 5754e9b

17 files changed

Lines changed: 21 additions & 41402 deletions

.github/workflows/cleanup.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/collect-realtime.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
title: 'chore: collect realtime data'
4747
body: 'Automated realtime facility data collection.'
4848
add-paths: |
49-
data/**
49+
data/realtime/**
5050
web/public/data/**
5151
5252
- name: Enable auto-merge

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Seoul Open Data API → GitHub Actions (cron) → Node.js scripts → data/*.jso
3737

3838
- **Real-time collection** runs every 5 minutes via GitHub Actions (`collect-realtime.yml`)
3939
- **Static facility data** collected daily at 3:15 PM KST (`collect-static.yml`)
40-
- Data stored as timestamped JSON under `data/YYYY-MM-DD/HH-MM/`
40+
- Realtime data stored in `data/realtime/` (overwritten on each collection)
4141
- Frontend reads `data/latest.json` (aggregated snapshot)
4242

4343
### Frontend (web/src/)

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
서울시 열린데이터광장 API
3535
→ GitHub Actions (cron)
3636
→ Node.js 수집 스크립트
37-
→ data/YYYY-MM-DD/HH-MM/*.json
37+
→ data/realtime/*.json (변경 시 덮어쓰기)
3838
→ build-latest.js
39-
→ data/latest.json
39+
web/public/data/latest.json
4040
→ Next.js 정적 사이트 (GitHub Pages)
4141
```
4242

@@ -46,7 +46,6 @@
4646
| `collect-static.yml` | 일 1회 | 정적 시설 정보 수집 |
4747
| `collect-environment.yml` | 매시간 | 대기질 데이터 수집 |
4848
| `deploy.yml` | push 시 | GitHub Pages 배포 |
49-
| `cleanup.yml` | 일 1회 | 7일 이상 경과 데이터 정리 |
5049

5150
## 로컬 개발
5251

@@ -92,7 +91,7 @@ cd web && npm run build # 정적 내보내기 → web/out/
9291
├── scripts/ # Node.js 수집 스크립트 (ES Modules)
9392
│ ├── api/ # 시설별 API 모듈 (elevator.js, escalator.js, …)
9493
│ └── config/ # API 엔드포인트 설정
95-
├── data/ # 수집 데이터 (YYYY-MM-DD/HH-MM/)
94+
├── data/realtime/ # 실시간 수집 데이터 (변경 시 덮어쓰기)
9695
├── web/ # Next.js 프론트엔드
9796
│ └── src/
9897
│ ├── app/ # App Router 페이지 (메인, 역 상세, 소개, 아카이브, 노선)

0 commit comments

Comments
 (0)