Transcodes echo/log audit pass
ramdisk_setup.sh: path/size detail lines → log (already in log block above); status done → echo. transcode_cleanup.sh: flip-back decision line and status done → echo. transcode_manager.sh: clean-run single-line summary → echo. Manual-Transcoding.md: added Output Tiers section.
This commit is contained in:
@@ -18,6 +18,24 @@ for the ramdisk transcode system. Read the Docker mount section before anything
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Output Tiers
|
||||||
|
|
||||||
|
All three scripts follow a two-tier output model: `echo` lines are always visible;
|
||||||
|
`log` lines only appear when `--log` is passed.
|
||||||
|
|
||||||
|
**ramdisk_setup.sh** — one-shot at array start. Without `--log`, section headers
|
||||||
|
and the final summary are visible. Per-step creation detail suppressed.
|
||||||
|
|
||||||
|
**transcode_manager.sh** — runs every 3 minutes. Without `--log`, only state
|
||||||
|
transitions (flips, warnings, errors) and active session display are shown. When
|
||||||
|
nothing changes, a single one-line confirmation is printed. Per-check detail suppressed.
|
||||||
|
|
||||||
|
**transcode_cleanup.sh** — runs every 3 minutes. Without `--log`, the cleanup
|
||||||
|
summary (files removed, space freed) is always visible. Per-file deletion detail
|
||||||
|
suppressed.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Docker Mount — Required Configuration
|
## Docker Mount — Required Configuration
|
||||||
|
|
||||||
> **This is the most important configuration requirement in this folder.**
|
> **This is the most important configuration requirement in this folder.**
|
||||||
|
|||||||
@@ -175,8 +175,8 @@ fi
|
|||||||
# ==============================================================================================
|
# ==============================================================================================
|
||||||
echo ""
|
echo ""
|
||||||
echo "━━━ $ICON_RAM Ramdisk — $MY_ID ━━━"
|
echo "━━━ $ICON_RAM Ramdisk — $MY_ID ━━━"
|
||||||
echo "$ICON_RAM Path: $RAMDISK_PATH"
|
log "$ICON_RAM Path: $RAMDISK_PATH"
|
||||||
echo "$ICON_RAM Size: $RAMDISK_SIZE"
|
log "$ICON_RAM Size: $RAMDISK_SIZE"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
START=$(date +%s)
|
START=$(date +%s)
|
||||||
@@ -355,7 +355,7 @@ echo ""
|
|||||||
if [[ "$DRY_RUN" == true ]]; then
|
if [[ "$DRY_RUN" == true ]]; then
|
||||||
warn "DRY RUN — no changes made"
|
warn "DRY RUN — no changes made"
|
||||||
elif [[ "$SETUP_SUCCESS" == true ]]; then
|
elif [[ "$SETUP_SUCCESS" == true ]]; then
|
||||||
log "$ICON_DONE Status: done ✅"
|
echo "$ICON_DONE Status: done ✅"
|
||||||
else
|
else
|
||||||
echo "$ICON_ERROR Status: SETUP HAD ERRORS"
|
echo "$ICON_ERROR Status: SETUP HAD ERRORS"
|
||||||
notify "Ramdisk setup errors on $(hostname) ($MY_ID) — check output" \
|
notify "Ramdisk setup errors on $(hostname) ($MY_ID) — check output" \
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ if [[ "$DRY_RUN" == false ]] && mountpoint -q "$RAMDISK_PATH" 2>/dev/null; then
|
|||||||
CURRENT_TARGET=$(grep "^current_target=" "$STATE_FILE" 2>/dev/null | cut -d= -f2)
|
CURRENT_TARGET=$(grep "^current_target=" "$STATE_FILE" 2>/dev/null | cut -d= -f2)
|
||||||
|
|
||||||
if [[ "$LOW_RECOVERED" == "1" && "$CURRENT_TARGET" == "$TRANSCODE_SSD" ]]; then
|
if [[ "$LOW_RECOVERED" == "1" && "$CURRENT_TARGET" == "$TRANSCODE_SSD" ]]; then
|
||||||
log "Ramdisk has space after cleanup (${RAMDISK_USED_GB}GB < ${RAMDISK_LOW_GB}GB) — triggering manager to flip back"
|
echo "Ramdisk has space after cleanup (${RAMDISK_USED_GB}GB < ${RAMDISK_LOW_GB}GB) — triggering manager to flip back"
|
||||||
bash "$SCRIPT_DIR/transcode_manager.sh" --no-log
|
bash "$SCRIPT_DIR/transcode_manager.sh" --no-log
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -314,6 +314,6 @@ echo "$ICON_TIME Duration: $(format_duration $(( END - START )))"
|
|||||||
if [[ "$DRY_RUN" == true ]]; then
|
if [[ "$DRY_RUN" == true ]]; then
|
||||||
warn "DRY RUN — no files deleted"
|
warn "DRY RUN — no files deleted"
|
||||||
else
|
else
|
||||||
log "$ICON_DONE Status: done ✅"
|
echo "$ICON_DONE Status: done ✅"
|
||||||
fi
|
fi
|
||||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||||
@@ -650,5 +650,5 @@ if [[ "$SOMETHING_HAPPENED" == true ]]; then
|
|||||||
echo "$ICON_TIME Duration: $(format_duration $(( END - START )))"
|
echo "$ICON_TIME Duration: $(format_duration $(( END - START )))"
|
||||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||||
else
|
else
|
||||||
log "Transcode manager — all healthy — $MY_ID ($(format_duration $(( END - START ))))"
|
echo "Transcode manager — all healthy — $MY_ID ($(format_duration $(( END - START ))))"
|
||||||
fi
|
fi
|
||||||
Reference in New Issue
Block a user