feat(Core/UI): 백테스트 전역 엔진 선택 버튼 추가 및 스캘핑 Rust 방어로직 포팅 1차 완료
This commit is contained in:
21
scratch/update_ls_limit3.py
Normal file
21
scratch/update_ls_limit3.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from database import TradeDB
|
||||
db = TradeDB()
|
||||
try:
|
||||
# row 존재하는지 확인
|
||||
row = db.conn.execute("SELECT id, LS_WS_MAX_SUBSCRIPTIONS FROM env_config LIMIT 1").fetchone()
|
||||
|
||||
if row:
|
||||
print("기존 값:", dict(row))
|
||||
db.conn.execute("UPDATE env_config SET LS_WS_MAX_SUBSCRIPTIONS='400' WHERE id=%s", (row['id'],))
|
||||
print("UPDATE 완료")
|
||||
else:
|
||||
db.conn.execute("INSERT INTO env_config (LS_WS_MAX_SUBSCRIPTIONS) VALUES ('400')")
|
||||
print("INSERT 완료")
|
||||
|
||||
db.conn.commit()
|
||||
|
||||
# 확인
|
||||
new_row = db.conn.execute("SELECT LS_WS_MAX_SUBSCRIPTIONS FROM env_config LIMIT 1").fetchone()
|
||||
print("변경 후 값:", dict(new_row))
|
||||
finally:
|
||||
db.close()
|
||||
Reference in New Issue
Block a user