mirror of
https://github.com/N0rthernL1ghts/wordpress.git
synced 2025-04-11 10:02:45 +02: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]}'"
|
echo "> Installing plugin '${PLUGIN[0]}' version '${PLUGIN[1]}'"
|
||||||
installPlugin "${WP_PLUGIN_INSTALL_ARGS}" &
|
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
|
done
|
||||||
|
|
||||||
echo "> Waiting for all plugins to install..."
|
|
||||||
|
echo "> Waiting for all tasks to finish..."
|
||||||
wait
|
wait
|
||||||
|
|
||||||
# Plugins are installed concurrently, so we need to verify if installed, separately
|
# Plugins are installed concurrently, so we need to verify if installed, separately
|
||||||
|
Loading…
x
Reference in New Issue
Block a user