fix: keep minor enhancements from #872 (#878)

This commit is contained in:
ljm42
2024-05-07 08:39:46 -07:00
committed by GitHub
parent 1d562d404c
commit 9ae9d40f94

View File

@@ -79,9 +79,11 @@ flush() {
# wait for existing git commands to finish before flushing
_waitforgitlog "${FAST}"
logger "flush: ${TASKACTION}" --tag flash_backup
# push any changes ad-hoc
# shellcheck disable=SC2086
echo "${TASKACTION}_nolimit &>/dev/null" | at ${QUEUE} -M now &>/dev/null
# if _connected, push any changes ad-hoc
if _connected; then
# shellcheck disable=SC2086
echo "${TASKACTION}_nolimit &>/dev/null" | at ${QUEUE} -M now &>/dev/null
fi
}
_watching() {
local flash_backup_pid
@@ -96,10 +98,13 @@ _watch() {
_clearlocks
# flush: this will ensure we start with a clean repo
flush
# wait for flush to complete
sleep 3
_waitforgitlog "${FAST}"
logger "start watching for file changes" --tag flash_backup
# start watcher loop
while true; do
# wait for system to be connected to Unraid Connect Cloud, then process flash backups
# if system is connected to Unraid Connect Cloud, see if there are updates to process
_connected && _f1
sleep 60
done