(feature) Add manual storage metrics refresh

Add a storage metrics refresh service and management command that update cached snapshot storage metadata outside web requests. The command supports host/kind filters, bounded scans, and dry-run output for operational refreshes.

Refs #98
This commit is contained in:
2026-06-08 23:31:32 +02:00
parent aac424e7ac
commit 89397b0cda
4 changed files with 315 additions and 0 deletions

View File

@@ -73,8 +73,13 @@ One-off maintenance commands are still available when the UI is not the right to
pobsync backup <host> --dry-run
pobsync discover-snapshots --host <host>
pobsync retention <host>
pobsync django refresh_pobsync_storage_metrics --host <host>
```
`refresh_pobsync_storage_metrics` refreshes cached snapshot storage metadata outside web requests. Use `--kind` to limit
the scan to `scheduled`, `manual`, or `incomplete`, `--max-entries` to bound large scans, and `--dry-run` to inspect
candidate counts without writing metadata.
For scripted configuration changes, call the Django management command explicitly so it is clear that this is an
automation/debugging path rather than the normal UI workflow: