MCPcopy Create free account
hub / github.com/Tong89/smartNode / load_latest_stats

Method load_latest_stats

backend/persistence/db.py:72–77  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

70 )
71
72 def load_latest_stats(self):
73 with self._lock:
74 row = self._conn.execute(
75 "SELECT payload FROM stats_snapshots ORDER BY id DESC LIMIT 1"
76 ).fetchone()
77 return json.loads(row["payload"]) if row else None
78
79 # ---- 归档与清理(控制存储增长)----
80 def purge_requests_before(self, cutoff_ts):

Callers 2

test_stats_snapshotFunction · 0.95

Calls

no outgoing calls

Tested by 2

test_stats_snapshotFunction · 0.76