Fix process counting...

This commit is contained in:
sh+git@codevoid.de 2019-10-27 18:32:35 +00:00
parent ec32f72617
commit 63b841a385
1 changed files with 2 additions and 2 deletions

View File

@ -85,8 +85,8 @@ get_width_by_height() {
}
# TOO MANY CONVERT PROCSSES => WAIT
thread_check() {
while [ $(pgrep convert | wc -l | awk '{ print $1 }') -gt $THREADS ];
do console "More than $THREADS convert threads. Waiting..."; sleep 2; done
while [ $(pgrep convert | wc -l | awk '{ print $1 }') -gt $(($THREADS-1)) ];
do console "Process Limit ($THREADS) reached. Waiting..."; sleep 2; done
}
# CREATE THUMBNAIL