Add peak-12h DEB history reference and bump extension to 0.1.5

This commit is contained in:
2569718930@qq.com
2026-03-23 23:17:48 +08:00
parent 354d55f752
commit 7adec4e17c
6 changed files with 268 additions and 2 deletions
+19
View File
@@ -362,6 +362,25 @@ class ProbabilitySnapshotRepository:
continue
return out
def load_rows_by_city_date(self, city: str, target_date: str) -> List[Dict[str, Any]]:
with self.db.connect() as conn:
rows = conn.execute(
"""
SELECT payload_json
FROM probability_training_snapshots_store
WHERE city = ? AND target_date = ?
ORDER BY timestamp ASC, id ASC
""",
(city, target_date),
).fetchall()
out = []
for row in rows:
try:
out.append(json.loads(row["payload_json"]))
except Exception:
continue
return out
def load_all_rows(self) -> List[Dict[str, Any]]:
with self.db.connect() as conn:
rows = conn.execute(