Harden demo export cleanup safety
This commit is contained in:
@@ -103,7 +103,8 @@ Offline demo export artifacts can be inspected and cleaned with:
|
||||
|
||||
```bash
|
||||
python scripts/cleanup_demo_artifacts.py
|
||||
python scripts/cleanup_demo_artifacts.py --keep-latest 3 --apply
|
||||
python scripts/cleanup_demo_artifacts.py --keep-latest 10 --export-type project_report_html
|
||||
python scripts/cleanup_demo_artifacts.py --keep-latest 10 --max-delete 100 --apply
|
||||
docker compose exec -T backend python scripts/cleanup_demo_artifacts.py
|
||||
```
|
||||
|
||||
@@ -112,7 +113,9 @@ The script is dry-run by default, targets only the explicit
|
||||
provided, keeps the newest export artifacts per matching project and refuses to
|
||||
delete files outside `STORAGE_ROOT`. It cleans `exports` records/files only; it
|
||||
does not remove original uploads, vector features, QA/QC rows, projects, areas,
|
||||
tiles, rasters or masks.
|
||||
tiles, rasters or masks. `--max-delete` defaults to 25 and blocks oversized
|
||||
apply runs until the operator increases the cap after reviewing dry-run output.
|
||||
Repeat `--export-type` to restrict cleanup to selected artifact kinds.
|
||||
|
||||
## Model storage
|
||||
|
||||
|
||||
Reference in New Issue
Block a user