feat: closes #2,#3,#4 — scripts pre_decimate + archive_job + check_jobs + tests

This commit is contained in:
Floppyrj45
2026-04-25 18:23:18 +02:00
parent 74edb36471
commit 48e9d42260
6 changed files with 267 additions and 0 deletions

29
scripts/archive_job.sh Normal file
View File

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# archive_job.sh <job_id> [frames_base] [nas_base]
# Rsyncs job frames + PLY to NAS .156
set -euo pipefail
JOB_ID="${1:?Usage: archive_job.sh <job_id> [frames_base] [nas_base]}"
FRAMES_BASE="${2:-/root/cosma-qc-frames}"
NAS_BASE="${3:-/mnt/nas-cosma/cosma-archive}"
SRC="${FRAMES_BASE}/job_${JOB_ID}"
DST="${NAS_BASE}/job_${JOB_ID}"
if [ ! -d "${SRC}" ]; then
echo "Job dir not found: ${SRC}"
exit 1
fi
mkdir -p "${DST}"
echo "[$(date)] Archivage job_${JOB_ID} vers NAS..."
rsync -av --progress "${SRC}/" "${DST}/" \
--include="frame_*.jpg" \
--include="*.ply" \
--include="*.npz" \
--include="*.log" \
--exclude="*" \
2>&1 | tail -5
echo "[$(date)] Archive job_${JOB_ID} done: ${DST}"