]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/update.php
Merge remote-tracking branch 'upstream/master' into cmake-port
[nominatim.git] / utils / update.php
index 95e99b9fb4ef565e08991127b44e7c7baea1a3a6..efdf652570d154a4f50925eb22657d7f463d137e 100755 (executable)
@@ -293,6 +293,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']) {