增加策略交易
This commit is contained in:
@@ -1318,11 +1318,20 @@ def init_db():
|
||||
close_reason TEXT, closed_at TEXT)"""
|
||||
)
|
||||
|
||||
from strategy_db import init_strategy_tables
|
||||
|
||||
init_strategy_tables(conn)
|
||||
conn.commit()
|
||||
conn.close()
|
||||
|
||||
init_db()
|
||||
|
||||
from strategy_config import build_strategy_config
|
||||
from strategy_register import attach_strategy_templates, register_strategy_trading
|
||||
|
||||
attach_strategy_templates(app, _REPO_ROOT)
|
||||
register_strategy_trading(app, build_strategy_config(sys.modules[__name__]))
|
||||
|
||||
def get_db():
|
||||
conn = sqlite3.connect(DB_PATH)
|
||||
conn.row_factory = sqlite3.Row
|
||||
|
||||
Reference in New Issue
Block a user