From 34a1016ecf674789fc2b557e3167709836f7c6c3 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Sat, 18 Mar 2023 17:30:44 -0400 Subject: [PATCH] 1.0.6 - bug fix --- QueueCleaner.bash | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/QueueCleaner.bash b/QueueCleaner.bash index 97b4b3c..7a2eab2 100644 --- a/QueueCleaner.bash +++ b/QueueCleaner.bash @@ -1,5 +1,5 @@ #!/usr/bin/with-contenv bash -scriptVersion="1.0.5" +scriptVersion="1.0.6" ######## Settings scriptInterval="15m" @@ -60,8 +60,7 @@ QueueCleanerProcess () { arrQueueIdsCount=$(( $arrQueueIdsCompletedCount + $arrQueueIdsFailedCount )) if [ $arrQueueIdsCount -eq 0 ]; then - log "No items in queue to clean up (sleeping $scriptInterval)..." - sleep $scriptInterval + log "No items in queue to clean up" else for queueId in $(echo $arrQueuedIds); do arrQueueItemData="$(echo "$arrQueueData" | jq -r "select(.id==$queueId)")" @@ -113,6 +112,8 @@ if [ "$arrName" == "Sonarr" ] || [ "$arrName" == "Radarr" ] || [ "$arrName" == " for (( ; ; )); do let i++ QueueCleanerProcess + log "Sleeping $scriptInterval..." + sleep $scriptInterval done else log "ERROR :: Arr app not detected, exiting..."