[fix]:[FL-213][修复高程文件记录服务导入失败]
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -208,6 +208,24 @@
|
||||
- 风险与关注点:
|
||||
- 改动仅移除 Worker 监控移动卡片容器的额外顶部间距,不影响接口、权限、表格、抽屉或数据筛选逻辑。
|
||||
|
||||
# Work Log - 高程文件记录服务导入修复(FL-213)
|
||||
|
||||
- 背景:
|
||||
- API 容器启动时报 `elevation_file_record_service` 无法从 `elevation_service` 导入 `_build_dataset_or_400`,导致容器反复重启。
|
||||
|
||||
- 本次处理:
|
||||
- 移除 `api/app/services/elevation_file_record_service.py` 中未使用且不存在的 `_build_dataset_or_400` 导入。
|
||||
- 新增 `api/tests/test_elevation_file_record_service_imports.py`,用 AST 检查 `elevation_file_record_service` 从 `elevation_service` 导入的符号均在目标模块作用域存在,防止同类启动期 ImportError 回归。
|
||||
|
||||
- 验证:
|
||||
- 基线:`PYTHONPATH=api python3 -c 'from app.services import elevation_file_record_service'` 因本地未安装 `sqlalchemy` 提前失败;随后使用 `uv` 准备完整 API 依赖时耗时过长,未作为有效基线。
|
||||
- 修改后:`python3 -m unittest api.tests.test_elevation_file_record_service_imports` 通过。
|
||||
- 修改后:`python3 -m py_compile api/app/services/elevation_file_record_service.py api/app/services/elevation_service.py api/tests/test_elevation_file_record_service_imports.py` 通过。
|
||||
- 修改后:`git diff --check` 通过。
|
||||
|
||||
- 风险与关注点:
|
||||
- 改动仅删除未使用导入并补充静态回归测试,不改变高程文件记录接口、任务派发、分析或地形瓦片生成逻辑。
|
||||
|
||||
# Work Log - 任务监控页面一致性优化(FL-156)
|
||||
|
||||
- 背景:
|
||||
|
||||
Reference in New Issue
Block a user