refactor: inject config sources into scheduled backups

Introduce a ConfigSource interface so scheduled backups no longer need
to load host configuration directly from runtime YAML. Add a Django-backed
config source for SQL-driven backup runs, keep file-based config as the
CLI default, and make scheduled prune execution actually apply retention
after successful runs.
This commit is contained in:
2026-05-19 04:57:10 +02:00
parent 18082496e4
commit bb44f8a09c
9 changed files with 216 additions and 13 deletions

View File

@@ -35,6 +35,6 @@ class SnapshotRecordAdmin(admin.ModelAdmin):
@admin.register(ScheduleConfig)
class ScheduleConfigAdmin(admin.ModelAdmin):
list_display = ("host", "cron_expr", "enabled", "prune", "updated_at")
list_filter = ("enabled", "prune")
list_display = ("host", "cron_expr", "enabled", "prune", "last_status", "last_started_at", "updated_at")
list_filter = ("enabled", "prune", "last_status")
search_fields = ("host__host", "cron_expr")