refactor: enhance Optuna backtesting framework, optimize orderbook filtering, and update database management utilities.
This commit is contained in:
25
scratch/db_config_short.py
Normal file
25
scratch/db_config_short.py
Normal file
@@ -0,0 +1,25 @@
|
||||
import sys
|
||||
sys.path.append('/home/hoon/kis_bot')
|
||||
from database import TradeDB
|
||||
|
||||
def check_db():
|
||||
db = TradeDB()
|
||||
try:
|
||||
row = db.conn.execute("SELECT * FROM config_short ORDER BY id DESC LIMIT 1").fetchone()
|
||||
if row:
|
||||
d = dict(row)
|
||||
print("config_short STRATEGY_SHORT_ENABLED:", d.get("STRATEGY_SHORT_ENABLED"))
|
||||
print("config_short STRATEGY_TAIL_ENABLED:", d.get("STRATEGY_TAIL_ENABLED"))
|
||||
|
||||
# Print all non-empty keys
|
||||
print("config_short dump:")
|
||||
for k, v in d.items():
|
||||
if v is not None and v != "":
|
||||
print(f" {k}: {v}")
|
||||
else:
|
||||
print("config_short is empty")
|
||||
finally:
|
||||
db.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
check_db()
|
||||
Reference in New Issue
Block a user