adjust logging output

This commit is contained in:
RandomNinjaAtk 2023-03-18 16:41:20 -04:00 committed by GitHub
parent 1ce5d97316
commit 24be27b6b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
scriptVersion="1.0.4" scriptVersion="1.0.5"
######## Settings ######## Settings
scriptInterval="15m" scriptInterval="15m"
@ -60,7 +60,8 @@ QueueCleanerProcess () {
arrQueueIdsCount=$(( $arrQueueIdsCompletedCount + $arrQueueIdsFailedCount )) arrQueueIdsCount=$(( $arrQueueIdsCompletedCount + $arrQueueIdsFailedCount ))
if [ $arrQueueIdsCount -eq 0 ]; then 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 else
for queueId in $(echo $arrQueuedIds); do for queueId in $(echo $arrQueuedIds); do
arrQueueItemData="$(echo "$arrQueueData" | jq -r "select(.id==$queueId)")" arrQueueItemData="$(echo "$arrQueueData" | jq -r "select(.id==$queueId)")"
@ -112,8 +113,6 @@ if [ "$arrName" == "Sonarr" ] || [ "$arrName" == "Radarr" ] || [ "$arrName" == "
for (( ; ; )); do for (( ; ; )); do
let i++ let i++
QueueCleanerProcess QueueCleanerProcess
log "Processing complete, sleeping for $scriptInterval..."
sleep $scriptInterval
done done
else else
log "ERROR :: Arr app not detected, exiting..." log "ERROR :: Arr app not detected, exiting..."