Replace Emby dirty-sync workaround with play_state_sync in handback

Emby now runs continuously on both hosts — play_state_sync via API
handles watch state reconciliation, making the 30-min dirty rsync
redundant. Handback runs play_state_sync --wait before DNS cutover
so users land on current state after a failover event.

- Emby removed from FALLBACK_HOST1_TIER1 (always running)
- Emby dirty sync removed from HOST1_CRITICAL_SYNC_SHARES
- Emby writeback removed from FALLBACK_HOST1_WRITEBACK_TIER1
- play_state_sync gains --wait flag (uses lock wait mode for handback)
- Tier 1 emby-fallback special case removed from handback writeback loop
- play_state_sync --wait added as Step 7 in handback, before DNS cutover
This commit is contained in:
Gmer4Lfe
2026-06-22 23:14:36 -04:00
parent 438de76655
commit c4d4d8160d
2 changed files with 26 additions and 10 deletions
+10 -3
View File
@@ -73,11 +73,18 @@
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../load_config.sh"
# ── Handle --full before parse_args ───────────────────────────────────────────
# ── Handle --full and --wait before parse_args ────────────────────────────────
FULL_SYNC=false
LOCK_MODE="strict"
_FILTERED=()
for _a in "$@"; do
[[ "$_a" == "--full" ]] && FULL_SYNC=true || _FILTERED+=("$_a")
if [[ "$_a" == "--full" ]]; then
FULL_SYNC=true
elif [[ "$_a" == "--wait" ]]; then
LOCK_MODE="wait"
else
_FILTERED+=("$_a")
fi
done
parse_args "${_FILTERED[@]}"
@@ -93,7 +100,7 @@ log "$ICON_GEAR Config: days=${SYNC_DAYS} types=${SYNC_TYPES} remote=${PLAY_SYNC
command -v jq >/dev/null 2>&1 || { error "jq is required but not installed"; exit 1; }
acquire_lock
acquire_lock "$LOCK_MODE"
# ── Build server list across ALL hosts ────────────────────────────────────────
# All HOST*_TRANSCODE_SERVERS arrays are loaded into env by load_config.sh.