X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/1542a006cbb315812316e6788ad68f7f3010e557..78d5b63e38b1165a22f27a5255e0c0d63d6464cb:/utils/update.php diff --git a/utils/update.php b/utils/update.php index 232a23c9..8137584c 100755 --- a/utils/update.php +++ b/utils/update.php @@ -298,6 +298,15 @@ if ($aResult['import-osmosis'] || $aResult['import-osmosis-all']) { // Index file $sThisIndexCmd = $sCMDIndex; + if (!isset($aResult['index-instances'])) { + if (getLoadAverage() < 24) + $iIndexInstances = 2; + else + $iIndexInstances = 1; + } else + $iIndexInstances = $aResult['index-instances']; + + $sThisIndexCmd = $sCMDIndex.' -t '.$iIndexInstances; $fCMDStartTime = time(); if (!$aResult['no-index']) {