X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/f50f46c1ce3fe44d8de55071d2fe1126ecb1d0ac..80a6751c51614c0d8baf84c0c52ffdc8ef76ff77:/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");