修复复盘列表与统计并行同步撞锁导致模拟盘加载失败。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-07 13:46:38 +08:00
parent cfcc0596ff
commit 2158a30179
5 changed files with 83 additions and 27 deletions
+4 -1
View File
@@ -929,7 +929,10 @@
var kpi = $("or-kpi");
var groups = $("or-stats-groups");
if (!kpi || !groups) return;
fetch("/api/options/review/stats?" + baseQs().toString(), { credentials: "same-origin" })
// 与 trades?sync=1 并行时不再二次同步,避免 SQLite database is locked
var qs = baseQs();
qs.set("sync", "0");
fetch("/api/options/review/stats?" + qs.toString(), { credentials: "same-origin" })
.then(function (r) {
return r.json();
})