Close every orchestrator the same way, and make skipped work a visible outcome

A gated-off section left nothing failed, so the weekly could run for hours and report "all
complete" beside "0 shares synced"; skipped is now derived from what was expected rather than
self-reported, and the verdict degrades to PARTIAL instead of flattering.
This commit is contained in:
Gmer4Lfe
2026-08-23 16:38:58 -04:00
parent dc8823724d
commit d5cf3db2ec
11 changed files with 148 additions and 150 deletions
+7 -9
View File
@@ -139,6 +139,10 @@ detect_hosts
# An unconfigured job list would run nothing and still report "0/0 passed" — indistinguishable
# from a healthy run. Fail loudly instead of silently doing no work.
# This orchestrator never timed itself, so its summary could not report a duration. Set before
# any work so the figure means the cycle, not the tail of it.
CYCLE_START=$(date +%s)
if [[ ${#TRANSCODE_MANAGEMENT_SCRIPTS[@]} -eq 0 ]]; then
error "TRANSCODE_MANAGEMENT_SCRIPTS is empty — no transcode management scripts will run"
error "Check TRANSCODE_MANAGEMENT_SCRIPTS in master.conf"
@@ -223,15 +227,9 @@ done
# ==============================================================================================
# ━━━ Summary — minimal one-liner by default (7-min cadence — keep it quiet when healthy) ━━━
# ==============================================================================================
if [[ "${#JOB_FAIL[@]}" -eq 0 ]]; then
echo "$ICON_SUCCESS Transcode cycle — ${#JOB_PASS[@]}/${#TRANSCODE_MANAGEMENT_SCRIPTS[@]} passed"
else
error "Transcode cycle — failed: ${JOB_FAIL[*]}"
if [[ "$DRY_RUN" != true ]]; then
notify "Transcode management failure on $(hostname) ($MY_ID) — ${JOB_FAIL[*]}" \
"Transcode Management" "warning"
fi
fi
# Quiet by default — 7-min cadence. Anything failed or skipped expands on its own.
JOB_COUNT="${#TRANSCODE_MANAGEMENT_SCRIPTS[@]}"
orchestrator_summary "TRANSCODE CYCLE" "${CYCLE_START:-$(date +%s)}" "Transcode Management" quiet
# ==============================================================================================
# ━━━ Exit ━━━