fix: 独立建库并整理离线依赖目录
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
## 2026-07-31: Latest-hour MySQL retention
|
||||
|
||||
- Scheduled runs write to MySQL by default. File-only development runs must explicitly pass `--no-database`; the MySQL host, port, account, password, database, and table are constants at the top of `main.py`.
|
||||
- The fixed database is `metrix` and the fixed table is `interference_hourly_summary`. Its only time column is `metric_time DATETIME`, populated from the source KPI `开始时间`, so users can identify the hour represented by every row.
|
||||
- The fixed script-owned database is `interference_etl` and the fixed table is `interference_hourly_summary`. Its only time column is `metric_time DATETIME`, populated from the source KPI `开始时间`, so users can identify the hour represented by every row.
|
||||
- One transaction deletes the selected hour for idempotent refresh, inserts its complete batch, then deletes every other database hour. Any failure rolls back the data changes, and an older selected hour cannot replace a newer hour already stored.
|
||||
- Database retention never deletes or modifies Metrix Storage/SFTP source ZIP or XLSX files. Generated CSV retention remains a separate pending decision.
|
||||
|
||||
@@ -31,4 +31,10 @@
|
||||
- Replaced the NR `masterOperatorId` passthrough with `gNBplmn-gNBId-cellId`. The remaining five 4G sources use the fixed `460-00` prefix plus their schema-specific base-station and cell ID columns.
|
||||
- Removed CGI PLMN and MySQL connection command-line/environment options. Database configuration now lives as a small constant block at the top of `main.py`; the verified bridge-network address is `172.17.0.1:3306` because `ShareMySQL` DNS is unavailable from the default script network.
|
||||
- Read-only online validation selected complete window `2026073115001600` and checked all 2,275 generated CGI values against the seven converted source CSV files. Per-source row counts were `6 / 1,198 / 48 / 91 / 731 / 179 / 22` in `EXPECTED_TYPES` order.
|
||||
- A connection-only check using the fixed constants returned database `metrix`. It did not create the table, insert rows, or delete existing data; all remote validation files were removed afterward.
|
||||
- Before the dedicated-database correction, a connection-only check returned the platform database `metrix`; that check did not create a table or modify data. Production use now targets only `interference_etl`.
|
||||
|
||||
## 2026-08-03: Dedicated database initialization
|
||||
|
||||
- InterferenceETL no longer writes into the Metrix platform database. Its fixed database is `interference_etl`, while the table remains `interference_hourly_summary`.
|
||||
- The default MySQL path first connects without selecting a database, runs `CREATE DATABASE IF NOT EXISTS interference_etl` with `utf8mb4`, then reconnects to that database and creates the table if needed. The configured account therefore needs database creation permission on first run.
|
||||
- Offline dependencies are stored below the workspace `vendor/` directory instead of separate package directories at the project root. `main.py` prepends this directory to `sys.path`, so the run command remains `python main.py`.
|
||||
|
||||
Reference in New Issue
Block a user