From 5ee7cb26475089d51bf936be467d540d85d9857d Mon Sep 17 00:00:00 2001 From: ljm42 Date: Mon, 9 Sep 2024 14:31:08 -0700 Subject: [PATCH] feat: reduce how often rc.flashbackup checks for changes Instead of checking once per minute, check once every 30 minutes --- plugin/source/dynamix.unraid.net/etc/rc.d/rc.flash_backup | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin/source/dynamix.unraid.net/etc/rc.d/rc.flash_backup b/plugin/source/dynamix.unraid.net/etc/rc.d/rc.flash_backup index 8a50128b4..33ee3e4fc 100755 --- a/plugin/source/dynamix.unraid.net/etc/rc.d/rc.flash_backup +++ b/plugin/source/dynamix.unraid.net/etc/rc.d/rc.flash_backup @@ -10,6 +10,7 @@ export GIT_OPTIONAL_LOCKS=0 FAST=1 # 1 second delay when waiting for git SLOW=10 # 10 second delay when waiting for git +THIRTYMINS=1800 # 30 minutes is 1800 seconds # wait for existing git commands to complete # $1 is the time in seconds to sleep when waiting. SLOW or FAST _waitforgit() { @@ -101,12 +102,12 @@ _watch() { # wait for flush to complete sleep 3 _waitforgitlog "${FAST}" - logger "start watching for file changes" --tag flash_backup + logger "checking for changes every $THIRTYMINS seconds" --tag flash_backup # start watcher loop while true; do # if system is connected to Unraid Connect Cloud, see if there are updates to process _connected && _f1 - sleep 60 + sleep "$THIRTYMINS" done } _f1() {