feat(settings): Settings → System shows table sizes and what the last cleanup removed (#5469)
#5469 "Settings → System: table sizes and what the last cleanup removed". - Storage: each table's size on disk (pg_total_relation_size, indexes and TOAST included) and Postgres's row estimate (reltuples), largest first, the 15 largest by name and the rest summed, under the database's total size. Read from the catalog only, never by counting rows. - Last cleanup: when it ran, how long it took, and what each pass removed (each aged table, run log files, the metric and Docker rollups, the log ring), or "Nothing was past its window". run_cleanup now returns that summary and keeps it as the cleanup.last_run setting, as reports.last_sent_at does; cleanup_secs (#5467) is recorded from the same figure. - A hint links to where each retention window is set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+2
-4
@@ -414,14 +414,12 @@ def _register_core_tasks(app: Quart) -> None:
|
||||
await run_due_monitors(app)
|
||||
|
||||
async def run_cleanup():
|
||||
import time
|
||||
from .core.cleanup import run_cleanup as _cleanup
|
||||
from .core.self_monitor import record_cleanup_secs
|
||||
started = time.monotonic()
|
||||
await _cleanup(app)
|
||||
done = await _cleanup(app)
|
||||
# How long it took, as Steward's own metric (#5467); a failed run
|
||||
# raises past this and records nothing.
|
||||
await record_cleanup_secs(app, time.monotonic() - started)
|
||||
await record_cleanup_secs(app, done["secs"])
|
||||
|
||||
async def run_alert_reconcile():
|
||||
from .alerts.service import reconcile_covering_rules
|
||||
|
||||
Reference in New Issue
Block a user