feat(retention): implement Piece 2 job archival, CLI wiring, and rotation driver

This commit is contained in:
operator
2026-10-07 03:28:38 +00:00
parent fff5556eb6
commit c11d1d83ae
7 changed files with 1003 additions and 24 deletions
+4
View File
@@ -103,6 +103,10 @@ def load_job(job_name):
# Try .json first, then .yaml (for compatibility)
job_file = JOBS_DIR / f"{job_name}.json"
if not job_file.exists():
archived_file = JOBS_DIR / "archive" / f"{job_name}.json"
if archived_file.exists():
print(f"Error: Job '{job_name}' is archived at {archived_file}. Unarchive before dispatch (e.g. 'box job unarchive {job_name}').", file=sys.stderr)
sys.exit(1)
job_file = JOBS_DIR / f"{job_name}.yaml"
if not job_file.exists():
print(f"Error: Job '{job_name}' not found in {JOBS_DIR}", file=sys.stderr)