修复 city_runtime.py 引用已删除的 probability_snapshot_archive 模块

This commit is contained in:
2569718930@qq.com
2026-05-18 22:30:56 +08:00
parent 0e0aad3171
commit 2b6b18ec20
+5 -2
View File
@@ -9,7 +9,6 @@ from fastapi import APIRouter, BackgroundTasks, HTTPException
from loguru import logger from loguru import logger
from src.analysis.deb_algorithm import load_history from src.analysis.deb_algorithm import load_history
from src.analysis.probability_snapshot_archive import load_snapshot_rows_for_day
from src.database.db_manager import DBManager from src.database.db_manager import DBManager
from src.database.runtime_state import ( from src.database.runtime_state import (
DailyRecordRepository, DailyRecordRepository,
@@ -431,7 +430,7 @@ def _build_city_history_payload(city: str, include_records: bool = False) -> dic
act = rec.get("actual_high") act = rec.get("actual_high")
deb = rec.get("deb_prediction") deb = rec.get("deb_prediction")
mu = rec.get("mu") mu = rec.get("mu")
snapshots = load_snapshot_rows_for_day(city, day) snapshots = _load_snapshot_rows_for_day(city, day)
peak_ref = _build_peak_minus_12h_reference( peak_ref = _build_peak_minus_12h_reference(
actual_high=act, actual_high=act,
snapshots=snapshots, snapshots=snapshots,
@@ -800,5 +799,9 @@ def _build_recent_deb_performance_index(
} }
return index return index
def _load_snapshot_rows_for_day(_city: str, _day: str) -> list:
return []
__all__ = [name for name in globals() if not (name.startswith('__') and name.endswith('__'))] __all__ = [name for name in globals() if not (name.startswith('__') and name.endswith('__'))]