Optimize nb of thread
This commit is contained in:
parent
1752eff2d9
commit
8a83ef15e9
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ mkdir -p "../cache/img/$startPath"
|
||||||
if [ ! $waitForResult ]
|
if [ ! $waitForResult ]
|
||||||
then
|
then
|
||||||
sleep $randomSleep
|
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
|
do
|
||||||
sleep $randomSleep
|
sleep $randomSleep
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue