refactor: P7 切尾——删除 application/extensions/utils,WSGI 切 src
【切尾】 - src/app.py:应用工厂(原 application/factory.py) - src/extensions.py:扩展注册编排(原 extensions/) - src/wsgi.py:生产 WSGI 入口 - 根 app.py 改为 from src.app import create_app(开发入口保留) - gunicorn/Docker/compose 指向 src.wsgi:app - 删除 application/、extensions/、utils/(全部代码已迁入 src/) 【清理】21 个 router 中间件导入改 src.core;修复 level 服务潜在 bug (utils.load2dict 不存在 → model_to_dict);测试文件 R 导入改 src.core 【里程碑】全项目 flake8 从 P1 基线 154 条 → **0 条**; 12 passed;app.py 与 src.wsgi 双入口均启动 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
4d74b31431
commit
5504f3f2c6
+1
-1
@@ -166,7 +166,7 @@ EXPOSE 8021
|
||||
# ----------------------------------------------------------------------------
|
||||
# 生产环境启动命令(使用 gunicorn 启动应用)
|
||||
# 配置文件:gunicorn.conf.py(在项目根目录)
|
||||
CMD ["gunicorn", "-c", "gunicorn.conf.py", "app:app"]
|
||||
CMD ["gunicorn", "-c", "gunicorn.conf.py", "src.wsgi:app"]
|
||||
|
||||
# ============================================================================
|
||||
# 附录:构建和测试指南
|
||||
|
||||
@@ -115,7 +115,7 @@ services:
|
||||
# ------------------------------------------------------------------------
|
||||
# 执行命令(覆盖 Dockerfile 中的 CMD)
|
||||
# 生产环境启动:使用 Gunicorn + Gevent
|
||||
command: gunicorn -c gunicorn.conf.py app:app
|
||||
command: gunicorn -c gunicorn.conf.py src.wsgi:app
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# 日志配置(集中式日志管理)
|
||||
|
||||
Reference in New Issue
Block a user