快取商品看板比價總覽
All checks were successful
CD Pipeline / deploy (push) Successful in 56s

This commit is contained in:
OoO
2026-05-13 11:44:20 +08:00
parent 6c236ebad0
commit 0d68f3ea73
2 changed files with 8 additions and 2 deletions

View File

@@ -320,7 +320,7 @@ YOUTUBE_API_KEY = os.getenv('YOUTUBE_API_KEY', '')
# ==========================================
# 系統版本與路徑
# ==========================================
SYSTEM_VERSION = "V10.106"
SYSTEM_VERSION = "V10.107"
LOG_FILE_PATH = os.path.join(BASE_DIR, 'logs/system.log')
public_url = PUBLIC_URL # 用於模板顯示

View File

@@ -1191,6 +1191,7 @@ def get_full_dashboard_data(force_rebuild=False):
'most_active_category': most_active_category_item[0],
'most_active_count': most_active_category_item[1]
}
full_data['competitor_overview'] = _load_competitor_decision_overview(session, unique_items)
# 更新快取
_DASHBOARD_DATA_CACHE['full_data'] = full_data
@@ -1412,7 +1413,12 @@ def index():
competitor.get('price') if competitor else None
)
competitor_overview = _load_competitor_decision_overview(session, unique_items)
competitor_overview = data.get('competitor_overview')
if not competitor_overview:
competitor_overview = _load_competitor_decision_overview(session, unique_items)
data['competitor_overview'] = competitor_overview
_DASHBOARD_DATA_CACHE['full_data'] = data
_write_shared_full_dashboard_cache(data)
template_name = 'dashboard.html' if request.args.get('ui') == 'legacy' else 'dashboard_v2.html'
return render_template(template_name,