X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/f50f46c1ce3fe44d8de55071d2fe1126ecb1d0ac..7e0fdf5928a0c726b22ad969267a3b9e0402c823:/utils/setup.php diff --git a/utils/setup.php b/utils/setup.php index e2810737..501ad3f2 100755 --- a/utils/setup.php +++ b/utils/setup.php @@ -62,7 +62,10 @@ if ($aCMDResult['import-data'] || $aCMDResult['all']) { // by default, use all but one processor, but never more than 15. -$iInstances = isset($aCMDResult['threads'])?$aCMDResult['threads']:(min(16,getProcessorCount())-1); +$iInstances = isset($aCMDResult['threads']) + ? $aCMDResult['threads'] + : (min(16, getProcessorCount()) - 1); + if ($iInstances < 1) { $iInstances = 1; warn("resetting threads to $iInstances");