Guard arr cache writes against in-flight rescans, add rescan monitor tool
A direct arr_cache_write() call mid-rescan wrote a partial snapshot that looked like real data loss to every consumer of the cache. The guard now lives in arr_cache_write() itself so every caller is protected, not just arr_get_tracked_data(). arr_rescan_monitor.sh closes the resulting gap for rescans triggered outside arr_full_rescan.sh's own trigger-and-wait path.
This commit is contained in:
@@ -86,7 +86,7 @@ for arr in lidarr sonarr radarr; do
|
||||
|
||||
active=$(arr_active_rescan_command "$arr" "$url" "$key" "$ver")
|
||||
if [[ -n "$active" ]]; then
|
||||
warn "${arr^} already mid-rescan ($active) — skipping, will catch it next scheduled run"
|
||||
warn "${arr^} already mid-rescan ($active) — skipping, will catch it next scheduled run (run Tools/arr_rescan_monitor.sh ${arr} to refresh its cache as soon as this one finishes instead of waiting)"
|
||||
(( SKIPPED++ ))
|
||||
continue
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user