fix: remove autocommit for named cursor in backtest

This commit is contained in:
root 2026-02-28 05:54:32 +00:00
parent 5ba4c7fe98
commit ca25938adc

View File

@ -348,7 +348,7 @@ def run_backtest(symbol: str, start_ms: int, end_ms: int, warmup_ms: int = WINDO
host=PG_HOST, port=PG_PORT, dbname=PG_DB,
user=PG_USER, password=PG_PASS
)
conn.set_session(autocommit=True)
# named cursor需要在事务内不要设autocommit=True
# 先warmup用回测起点前4h的数据预热指标
warmup_start = start_ms - warmup_ms