v1.5 add queueCleanerScriptInterval

This commit is contained in:
RandomNinjaAtk 2023-07-15 10:40:18 -04:00 committed by GitHub
parent 66ff13884c
commit a2ad715f06
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.4" scriptVersion="1.5"
scriptName="QueueCleaner" scriptName="QueueCleaner"
log () { log () {
@ -16,6 +16,10 @@ verifyConfig () {
log "Sleeping (infinity)" log "Sleeping (infinity)"
sleep infinity sleep infinity
fi fi
if [ -z "$queueCleanerScriptInterval" ]; then
queueCleanerScriptInterval="15m"
fi
} }
logfileSetup () { logfileSetup () {
@ -124,8 +128,8 @@ for (( ; ; )); do
verifyConfig verifyConfig
log "Starting..." log "Starting..."
QueueCleanerProcess QueueCleanerProcess
log "Sleeping 15m..." log "Sleeping $queueCleanerScriptInterval..."
sleep 15m sleep $queueCleanerScriptInterval
done done
exit exit