refactor: reuse routing and remove unused analysis helpers
Generic Container CI/CD / test-build-publish (push) Successful in 4m3s
Server CI/CD v2 / build-test-publish-and-deploy (push) Successful in 4m3s

This commit is contained in:
2026-11-09 18:49:32 +08:00
parent 6a4478bfe4
commit e47c61c121
6 changed files with 107 additions and 103 deletions
-19
View File
@@ -405,25 +405,6 @@ def _store_burst_scheme(
)
def _validate_scada_windows(
*,
scada_burst_start: datetime | str | None,
scada_burst_end: datetime | str | None,
) -> tuple[datetime, datetime]:
values = [scada_burst_start, scada_burst_end]
if any(v is None for v in values):
raise ValueError(
"使用后端 SCADA 查询时,必须同时提供 scada_burst_start/scada_burst_end。"
)
burst_start_dt = _to_datetime(scada_burst_start)
burst_end_dt = _to_datetime(scada_burst_end)
if burst_start_dt >= burst_end_dt:
raise ValueError(
"爆管时段 SCADA 时间窗非法:scada_burst_start 必须早于 scada_burst_end。"
)
return burst_start_dt, burst_end_dt
def _validate_time_window(
*,
start_value: datetime | str | None,