fix: remove autocommit for named cursor in backtest
This commit is contained in:
parent
5ba4c7fe98
commit
ca25938adc
@ -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,
|
host=PG_HOST, port=PG_PORT, dbname=PG_DB,
|
||||||
user=PG_USER, password=PG_PASS
|
user=PG_USER, password=PG_PASS
|
||||||
)
|
)
|
||||||
conn.set_session(autocommit=True)
|
# named cursor需要在事务内(不要设autocommit=True)
|
||||||
|
|
||||||
# 先warmup(用回测起点前4h的数据预热指标)
|
# 先warmup(用回测起点前4h的数据预热指标)
|
||||||
warmup_start = start_ms - warmup_ms
|
warmup_start = start_ms - warmup_ms
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user