fix(dashboard): warm cache after AI pick refresh
All checks were successful
CD Pipeline / deploy (push) Successful in 3m37s

This commit is contained in:
OoO
2026-05-01 16:16:39 +08:00
parent b447aefcfb
commit b3d00a011c
7 changed files with 18 additions and 5 deletions

View File

@@ -2071,6 +2071,7 @@ def run_pchome_match_backfill_task():
from config import DATABASE_PATH
from sqlalchemy import create_engine
from services.ai_product_pick_agent import generate_product_pick_list
from services.cache_manager import clear_dashboard_cache
from services.competitor_price_feeder import CompetitorPriceFeeder
now_str = datetime.now(TAIPEI_TZ).strftime('%Y-%m-%d %H:%M')
@@ -2079,6 +2080,7 @@ def run_pchome_match_backfill_task():
engine = create_engine(DATABASE_PATH)
feeder_result = CompetitorPriceFeeder(engine=engine).run_unmatched_priority(limit=120)
pick_result = generate_product_pick_list(engine, limit=50)
clear_dashboard_cache()
stats = {
"total_skus": feeder_result.total_skus,