Optimize nb of thread

This commit is contained in:
Knah Tsaeb 2016-12-12 16:03:56 +01:00
parent 1752eff2d9
commit 8a83ef15e9

View file

@ -51,7 +51,7 @@ mkdir -p "../cache/img/$startPath"
if [ ! $waitForResult ]
then
sleep $randomSleep
while [[ `ps -e | grep -v grep | grep phantomjs | wc -l` -ge $maxThread ]]
while [[ `ps -ax | grep -v grep | grep phantomjs | wc -l` -ge $maxThread ]]
do
sleep $randomSleep
done