mirror of
https://github.com/N0rthernL1ghts/wordpress.git
synced 2024-11-23 15:22:29 +01:00
Limit concurrency to 4 plugins per batch
This should help avoid concurrency related issues, sacrificing a little bit of performance
This commit is contained in:
parent
e2ed315ff2
commit
aa68d5ba82
|
@ -59,9 +59,16 @@ function main() {
|
|||
|
||||
echo "> Installing plugin '${PLUGIN[0]}' version '${PLUGIN[1]}'"
|
||||
installPlugin "${WP_PLUGIN_INSTALL_ARGS}" &
|
||||
|
||||
# Run maximum of 2 plugin installs in parallel
|
||||
while [ "$(jobs | wc -l)" -ge 2 ]; do
|
||||
echo " Waiting for batch of 2 plugins to install..."
|
||||
wait
|
||||
done
|
||||
done
|
||||
|
||||
echo "> Waiting for all plugins to install..."
|
||||
|
||||
echo "> Waiting for all tasks to finish..."
|
||||
wait
|
||||
|
||||
# Plugins are installed concurrently, so we need to verify if installed, separately
|
||||
|
|
Loading…
Reference in New Issue
Block a user