diff --git a/QueueCleaner.bash b/QueueCleaner.bash index 3b5a3eb..97b4b3c 100644 --- a/QueueCleaner.bash +++ b/QueueCleaner.bash @@ -1,5 +1,5 @@ #!/usr/bin/with-contenv bash -scriptVersion="1.0.4" +scriptVersion="1.0.5" ######## Settings scriptInterval="15m" @@ -60,7 +60,8 @@ QueueCleanerProcess () { arrQueueIdsCount=$(( $arrQueueIdsCompletedCount + $arrQueueIdsFailedCount )) if [ $arrQueueIdsCount -eq 0 ]; then - log "No items in queue to clean up..." + log "No items in queue to clean up (sleeping $scriptInterval)..." + sleep $scriptInterval else for queueId in $(echo $arrQueuedIds); do arrQueueItemData="$(echo "$arrQueueData" | jq -r "select(.id==$queueId)")" @@ -112,8 +113,6 @@ if [ "$arrName" == "Sonarr" ] || [ "$arrName" == "Radarr" ] || [ "$arrName" == " for (( ; ; )); do let i++ QueueCleanerProcess - log "Processing complete, sleeping for $scriptInterval..." - sleep $scriptInterval done else log "ERROR :: Arr app not detected, exiting..."