修复策略交易
This commit is contained in:
@@ -1459,12 +1459,6 @@ def init_db():
|
||||
|
||||
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
|
||||
@@ -7741,6 +7735,11 @@ except Exception as _hub_err:
|
||||
print(f"[hub_bridge] gate: {_hub_err}")
|
||||
|
||||
|
||||
from strategy_register import install_strategy_trading
|
||||
|
||||
install_strategy_trading(app, _REPO_ROOT, app_module=sys.modules[__name__])
|
||||
|
||||
|
||||
# 启动
|
||||
if __name__ == "__main__":
|
||||
threading.Thread(target=background_task, daemon=True).start()
|
||||
|
||||
Reference in New Issue
Block a user