]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/update.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / utils / update.php
index 232a23c97dc57dca322381e14da2b3d282d268b8..8137584c71cc2540504fa5755eb11608ff8fe6cb 100755 (executable)
@@ -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']) {