Add PostgreSQL production backend to eliminate SQLite lock contention.
Support DATABASE_URL with connection pooling, pg_dump backups, SQLite migration script, and deploy_postgres.sh with docs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -859,8 +859,13 @@
|
||||
equityEl.textContent = fmtMoney(data.capital);
|
||||
}
|
||||
var rows = positionRows(data);
|
||||
if (!rows.length && data.sync_state === 'syncing' && lastPosRows.length) {
|
||||
rows = lastPosRows;
|
||||
if (!rows.length && lastPosRows.length) {
|
||||
var keepSticky = data.sync_state === 'syncing'
|
||||
|| Number(data.margin_used) > 0
|
||||
|| (data.risk_status && Number(data.risk_status.active_count) > 0);
|
||||
if (keepSticky) {
|
||||
rows = lastPosRows;
|
||||
}
|
||||
}
|
||||
var sig = rows.map(function (r) {
|
||||
var key = r.key || r.position_key || ((r.symbol_code || '') + ':' + (r.direction || ''));
|
||||
|
||||
Reference in New Issue
Block a user