Add OPERATIONAL SAFEGUARDS headers, skip prefill during active rescans
arr_full_rescan.sh, arr_cache_prefill.sh, and arr_rescan_monitor.sh were missing the standard SAFEGUARDS header section other Arrs_Stack/Tools scripts have. Also: arr_cache_prefill.sh now checks for an active rescan before fetching, instead of doing a live fetch that arr_cache_write() would just refuse to persist anyway -- avoids wasted API calls every 30min during a long rescan. arr_rescan_monitor.sh was also missing an actual root check despite writing cache files; added it to match convention rather than just document a safeguard that wasn't there.
This commit is contained in:
@@ -20,6 +20,24 @@
|
||||
# and running them concurrently would just contend for the same disk I/O for no benefit.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# OPERATIONAL SAFEGUARDS
|
||||
# ==============================================================================================
|
||||
#
|
||||
# Root required — required for consistency across Arrs_Stack/, no direct fs writes here
|
||||
# acquire_lock "wait" — waits for a prior run to finish rather than skipping or colliding;
|
||||
# a full-library rescan across three arrs can run long, worth queuing
|
||||
# behind rather than silently no-op'ing
|
||||
# Reachability check — check_api before touching an arr; unreachable → skip that arr only
|
||||
# Active-rescan check — skips triggering a NEW rescan if one's already active on that arr
|
||||
# (manual trigger, another script) — never stacks a duplicate scan,
|
||||
# see Tools/arr_rescan_monitor.sh for catching up that arr's cache
|
||||
# once the pre-existing scan finishes instead of waiting for next week
|
||||
# Sequential only — never runs two arrs' rescans in parallel; each is a heavy full-disk
|
||||
# walk and concurrent walks would just contend for the same disk I/O
|
||||
# Per-arr isolation — one arr failing, timing out, or being skipped never blocks the others
|
||||
# --dry-run mode — reports which arrs would be rescanned, triggers nothing
|
||||
#
|
||||
# ==============================================================================================
|
||||
# CONFIGURATION
|
||||
# ==============================================================================================
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user