v2.2.1: frontend closed-source + Docker one-click deploy

- Remove frontend source code (now in private repo)
- Add pre-built frontend/dist/ with Nginx serving
- Simplify docker-compose.yml (no Node.js build needed)
- Update README with docs index and Docker deploy guide
- Add admin order list and AI analysis stats tabs
- Add quick trade API routes
- Clean up redundant files (package-lock.json, yarn.lock, .iml)
- Add GitHub Actions workflow for frontend update automation
This commit is contained in:
TIANHE
2026-02-27 19:57:23 +08:00
parent ffdd2ffbae
commit abbad97bdd
250 changed files with 1895 additions and 91621 deletions
+26
View File
@@ -74,6 +74,31 @@ def start_pending_order_worker():
logger.error(f"Failed to start pending order worker: {e}")
def start_usdt_order_worker():
"""Start the USDT order background worker.
Periodically scans pending/paid USDT orders and checks on-chain status.
Ensures orders are confirmed even if the user closes the browser after payment.
Only starts if USDT_PAY_ENABLED=true.
"""
import os
if str(os.getenv("USDT_PAY_ENABLED", "False")).lower() not in ("1", "true", "yes"):
logger.info("USDT order worker not started (USDT_PAY_ENABLED is not true).")
return
# Avoid running twice with Flask reloader
debug = os.getenv("PYTHON_API_DEBUG", "false").lower() == "true"
if debug:
if os.environ.get("WERKZEUG_RUN_MAIN") != "true":
return
try:
from app.services.usdt_payment_service import get_usdt_order_worker
get_usdt_order_worker().start()
except Exception as e:
logger.error(f"Failed to start USDT order worker: {e}")
def restore_running_strategies():
"""
Restore running strategies on startup.
@@ -231,6 +256,7 @@ def create_app(config_name='default'):
with app.app_context():
start_pending_order_worker()
start_portfolio_monitor()
start_usdt_order_worker()
restore_running_strategies()
return app