[V10.328] 強化 PChome 比價診斷與狀態分流
All checks were successful
CD Pipeline / deploy (push) Successful in 1m7s

This commit is contained in:
OoO
2026-05-20 13:24:38 +08:00
parent 875810620f
commit 2c47a79f05
15 changed files with 581 additions and 31 deletions

View File

@@ -12,6 +12,9 @@
## 📅 詳細更新日誌 (考古存檔)
### 2026-05-20重開機後首頁熱路徑索引持久化
- **Dashboard / PChome 慢查詢修復**: 主機重開機後 `https://mo.wooo.work/` 首頁可用但多次逾時,實際瓶頸集中在首頁與 PChome coverage 查詢掃描 `products``price_records``competitor_match_attempts`。線上先補三個索引讓首頁恢復 200並新增 `migrations/040_dashboard_hot_path_indexes.sql` 將修復持久化到 fresh restore / DB rebuild 流程。
### 2026-04-29ADR-017 Phase 3f 模組化收尾啟動
- **DB metadata 救急**: `database/manager.py` 改為顯式載入 permission / AI / autoheal / import / vendor / realtime_sales ORMPostgreSQL 初始化透過 process-local guard + advisory lock 執行 `Base.metadata.create_all()`,避免新環境漏表與一般流量重複碰 DDL。
- **realtime_sales_monthly 補 ORM**: 新增 `database/realtime_sales_models.py`,並同步 `docker/postgres/init/01-init.sql` 欄位,避免 fresh volume 先建出窄表後造成匯入欄位靜默遺失。