feat: 쇼츠 목록을 요청 때가 아니라 워커가 하루 3번(07·12·18시 10분)과 켤 때 받아 둠, 캐시는 2일 — 사용자는 유튜브 응답을 기다리지 않음

This commit is contained in:
minaChoi committed 2026-10-26 15:16:08 +09:00
1 parent e0a723a3e4
commit ba70fbcd49
4 files changed
+39 -4

No files matched your search

+8
View File
@@ -21,6 +21,7 @@ from services.external.culture_api import SIDO_NAME
from services.external.data_go_kr import DataGoKrNotConfigured, DataGoKrRequestFailed
from services.external.open_meteo import OpenMeteoRequestFailed, fetch_weather, parse_weather
from services.feed_service import build_feed_day, clear_feed_cache
from services.shorts_service import ShortsService
from services.week_service import collect_events, drop_known
from services.weekend_rank import WeekendRank
@@ -188,3 +189,10 @@ async def refresh_events(only_if_missing: bool = False) -> ErrorType:
LOG.error(f"[scheduler] refresh_events done mark: {e}")
LOG.info(f"[scheduler] refresh_events: {detail}")
return ErrorType.SUCCESS if ok else ErrorType.EXTERNAL_API_ERROR
async def refresh_shorts() -> ErrorType:
"""오늘 화면 쇼츠 줄 목록을 유튜브에서 새로 받아 둔다."""
err, items = await ShortsService().refresh()
LOG.info(f"[scheduler] refresh_shorts: {len(items)}개 {err.name}")
return err