feat: 实现异步导出骨架(Threading + Redis 状态流转),支持 POST 提交/轮询状态/下载文件

This commit is contained in:
DXC
2026-05-19 10:35:33 +08:00
parent 6e1e1aa998
commit 4d81056075
4 changed files with 523 additions and 0 deletions

View File

@ -234,6 +234,17 @@ def create_app():
except Exception as e:
print(f"❌ 错误: Scan 模块注册失败: {e}")
# -----------------------------------------------------
# 2.x 注册异步导出模块 (Export)
# -----------------------------------------------------
try:
from app.api.v1.export import export_bp
app.register_blueprint(export_bp, url_prefix='/api/v1/export')
app.register_blueprint(export_bp, url_prefix='/api/export', name='export_legacy')
print("✅ Export 模块注册成功")
except Exception as e:
print(f"❌ 错误: Export 模块注册失败: {e}")
# =========================================================
# 3. 预加载数据模型
# =========================================================