Commit Graph

2 Commits

Author SHA1 Message Date
c428566c9a feat: fetcher 支援多 target union 掃描
- 新增 RADAR_TARGETS 環境變數('name:lat,lng;...')
- 未設時 fall back 到單點 RADAR_LAT/LNG(backward-compat)
- 主流程改為 loop 每個 target 呼叫 Function Server,以 (id, lat, lng, expire_time) dedupe 後 union
- 單點失敗不阻斷其他 target(try/except 包起來)
- debug 記錄每 target 原始筆數與完整 targets 清單
- 搭配 RADAR_ZOOM=15 解決 zoom 11 廣視角下單位面積密度過低的問題

本機驗證:5 target(台北/內湖/板橋/新竹/宜蘭)union 191 筆,
twpk 內湖南港街區 bounds(zoom 17 視角)從 0 筆變 2 筆。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 11:35:44 +08:00
f7ef105436 init: Redis-backed Pokémon 雷達 API
- radar_fetcher.py:呼叫 Function Server 抓 twpkinfo.com 資料後寫入 Redis (TTL 300s)
- pokemon_radar_api.py:FastAPI /scan,從 Redis 讀取並依 request 即時二次篩選;Redis 不可用時回 200 空結果,不再 500
- pokemon_location_fetcher.py:舊版 CLI,仍由 fetch_and_upload.sh 使用
- 文件:README (參考手冊)、QUICKSTART (操作指南)、SUMMARY (故事線)、CLAUDE.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 09:13:59 +08:00