feat(Core/UI): 백테스트 전역 엔진 선택 버튼 추가 및 스캘핑 Rust 방어로직 포팅 1차 완료

This commit is contained in:
Your Name
2026-09-03 02:49:14 +09:00
parent ac1190f1fc
commit 3b7c21cde4
316 changed files with 56952 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
import sys, os
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')
from database import TradeDB
db = TradeDB()
try:
# ws_orderbook 실제 테이블명 확인
tables = [dict(r)['Tables_in_kis_quant_db'] for r in db.conn.execute("SHOW TABLES").fetchall()]
ob_tables = [t for t in tables if 'orderbook' in t.lower() or 'order' in t.lower()]
print("[호가 관련 테이블 목록]")
for t in ob_tables:
cnt = dict(db.conn.execute(f"SELECT count(*) as c FROM `{t}`").fetchone())['c']
print(f" {t}: {cnt}")
# 환경변수 재확인
print("\n[WS_ORDERBOOK_SAVE_KIS DB 값]")
cols = [dict(r)["Field"] for r in db.conn.execute("SHOW COLUMNS FROM env_config").fetchall()]
print(" env_config 컬럼:", cols)
key_col = 'env_key' if 'env_key' in cols else ('`key`' if 'key' in cols else cols[0])
val_col = 'env_value' if 'env_value' in cols else ('value' if 'value' in cols else cols[1])
print(f" key_col={key_col}, val_col={val_col}")
row = db.conn.execute(f"SELECT * FROM env_config WHERE {key_col} = 'WS_ORDERBOOK_SAVE_KIS'").fetchone()
print(" 값:", dict(row) if row else "없음!")
finally:
db.close()