补齐遗漏的启动必需模块 (修复 Mac 打包后启动失败)
根因: audit_logger.py / config_util.py / preflight.py 这三个启动
必需模块从未被 git 追踪过. Windows 构建机上这些文件在本地磁盘,
PyInstaller 能找到, 所以 Win 包正常; 但 Mac 拉代码后根目录缺这
三个文件, PyInstaller 的 Analysis 找不到 import 链, 构建要么失败
要么运行时 ImportError.
本次补齐:
- audit_logger.py — 审计日志单例 (NDJSON 本地队列 + 异步 MySQL 上传)
- config_util.py — 跨平台配置路径解析与安全加载
- preflight.py — 启动门禁 (config/DB/schema 校验)
- database_schema.sql — 运维参考
- migrations/2026-04-21_add_audit_log_columns.sql — 审计表迁移
- .gitignore — 屏蔽 .venv/build/dist/logs/__pycache__ 等,
防止以后再漏推业务代码时被大量噪声淹没
Showing
6 changed files
with
384 additions
and
0 deletions
.gitignore
0 → 100644
audit_logger.py
0 → 100644
This diff is collapsed.
Click to expand it.
config_util.py
0 → 100644
database_schema.sql
0 → 100644
preflight.py
0 → 100644
-
Please register or sign in to post a comment