fix: 独立建库并整理离线依赖目录

This commit is contained in:
2026-08-03 09:42:00 +08:00
parent 36338152d0
commit 2d0d0c181e
5 changed files with 92 additions and 17 deletions
+2 -2
View File
@@ -31,7 +31,7 @@ CGI is generated with fixed rules:
- NR (`5G干扰监控`, `700M干扰监控`): `{gNBplmn}-{gNBId}-{cellId}`.
- 4G (the other five source types): `460-00-{eNodeBID}-{小区ID}`, using each source schema's actual equivalent column names.
MySQL connection values, database `metrix`, and table `interference_hourly_summary` are constants at the top of `main.py`; they are not project environment variables.
MySQL connection values, database `interference_etl`, and table `interference_hourly_summary` are constants at the top of `main.py`; they are not project environment variables. The script creates its database and table automatically when they do not exist.
## Local development
@@ -52,7 +52,7 @@ docker build -t interference-etl-runtime:1.1 .
python scripts\build_offline_package.py
```
The generated `dist/InterferenceETL-offline-1.1.zip` contains `main.py`, a ZIP execution entry point, and `openpyxl`, `et_xmlfile`, and `PyMySQL`. The builder verifies both imports and ZIP execution using the standard `python:3.13.11-slim` image, so the uploaded workspace does not need an online `pip install` or a custom runtime image.
The generated `dist/InterferenceETL-offline-1.1.zip` contains `main.py`, a ZIP execution entry point, and a `vendor/` directory containing `openpyxl`, `et_xmlfile`, and `PyMySQL`. The builder verifies both imports and ZIP execution using the standard `python:3.13.11-slim` image, so the uploaded workspace does not need an online `pip install` or a custom runtime image.
Create the project, then upload and extract the ZIP in its Script Management workspace. The normal file tree should contain `main.py` at `/workspace/main.py`. Use these project settings: