X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/251793e8aa3edb03686502ba680d5c339a440e7a..9a9a6f2b66d1ce4459bff4bf1926f504fc26e515:/utils/update.php?ds=sidebyside diff --git a/utils/update.php b/utils/update.php index d3c2bc73..270850f9 100755 --- a/utils/update.php +++ b/utils/update.php @@ -365,6 +365,12 @@ if ($aResult['import-osmosis'] || $aResult['import-osmosis-all']) { + + if (strpos(CONST_Replication_Url, 'download.geofabrik.de') !== false && CONST_Replication_Update_Interval < 86400) { + echo "Error: Update interval too low for download.geofabrik.de. Please check install documentation (http://wiki.openstreetmap.org/wiki/Nominatim/Installation#Updates)\n"; + exit; + } + $sImportFile = CONST_BasePath.'/data/osmosischange.osc'; $sOsmosisCMD = CONST_Osmosis_Binary; $sOsmosisConfigDirectory = CONST_BasePath.'/settings'; @@ -534,7 +540,7 @@ if ( CONST_Replication_Update_Interval > 60 ) { - $iSleep = round(CONST_Replication_Update_Interval*0.8); + $iSleep = max(0,(strtotime($sBatchEnd)+CONST_Replication_Update_Interval-time())); } else {