fix: 출시 전 QA 버그 3건 — 주말 플랜 500, 광주·전남 행사 0건, 미세먼지 갱신 멈춤

- 주말 플랜: '14시~' 같은 시간 라벨에서 정렬이 멈춰 피드 전체가 500 (광산구·울릉군)
- 광주·전남: 구 코드는 12인데 행사는 29·46으로 저장돼 27개 구에서 행사를 못 찾음
- 미세먼지: 에어코리아 전국 조회가 15~20초 걸려 8초 한도에 매번 걸림 → 45초
This commit is contained in:
minaChoi committed 2026-10-08 13:58:06 +09:00
1 parent 5734b57758
commit 1fa0695c84
7 files changed
+60 -12

No files matched your search

+4 -2
View File
@@ -8,6 +8,8 @@ from services.external.data_go_kr import get_all_items
REALTIME_URL = "https://apis.data.go.kr/B552584/ArpltnInforInqireSvc/getCtprvnRltmMesureDnsty"
STATION_URL = "https://apis.data.go.kr/B552584/MsrstnInfoInqireSvc/getMsrstnList"
# 전국 조회는 한 번에 15~20초 걸린다. 갱신은 피드 응답과 따로 돌아 기다리게 하지 않는다.
BUDGET_SEC = 45.0
def _int(v) -> Optional[int]:
@@ -26,11 +28,11 @@ def _measured_at(text: str) -> datetime:
async def fetch_realtime(client: httpx.AsyncClient) -> list[dict]:
return await get_all_items(client, REALTIME_URL, {"returnType": "json", "sidoName": "전국", "ver": "1.0"})
return await get_all_items(client, REALTIME_URL, {"returnType": "json", "sidoName": "전국", "ver": "1.0"}, budget_sec=BUDGET_SEC)
async def fetch_stations(client: httpx.AsyncClient) -> list[dict]:
return await get_all_items(client, STATION_URL, {"returnType": "json"})
return await get_all_items(client, STATION_URL, {"returnType": "json"}, budget_sec=BUDGET_SEC)
def parse_realtime(items: list[dict]) -> list[dict]: