Expired Cleaner: set auto_fix=True so the Dry Run badge shows (was mislabeled 'Scan Only')

The maintenance UI only renders the Scan → Dry Run / Auto-fix flow badge for
jobs with auto_fix=True (enrichment.js:1749/1925); auto_fix=False jobs show
'Scan Only'. The Expired Cleaner DOES have an auto mode (dry_run off → deletes
in-scan), so it should be auto_fix=True — that both labels it correctly and
surfaces the Dry Run badge. Safe: auto_fix is a UI/metadata flag only (exposed
at repair_worker.py:369); the worker never auto-applies from it — scan() owns
the dry_run-vs-delete decision. No behavior change, just the right badge.
This commit is contained in:
BoulderBadgeDad 2026-06-07 22:24:59 -07:00
parent 46730d1661
commit 8f7ff472b2

View file

@ -91,7 +91,11 @@ class ExpiredDownloadCleanerJob(RepairJob):
'playlist_retention': RETENTION_OPTIONS,
'dry_run': [True, False],
}
auto_fix = False
# Has an auto mode (dry_run off → deletes in-scan). auto_fix is a UI/metadata
# flag only — the worker never auto-applies from it; scan() self-manages the
# dry_run vs delete decision. Setting True surfaces the Scan → Dry Run /
# Auto-fix flow badge (without it the job mislabels as "Scan Only").
auto_fix = True
def _get_settings(self, context: JobContext) -> dict:
merged = dict(self.default_settings)