]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/update.php
add /lookup endpoint to monitored API calls
[nominatim.git] / utils / update.php
index 972a6fdf8a91e83129dc20f3c23b404b162e8b9e..f7f20aa3f76fc14541e87dd0d5feaccfcd19f449 100755 (executable)
@@ -263,12 +263,12 @@ if ($aResult['import-osmosis'] || $aResult['import-osmosis-all']) {
             }
 
             // Download the next batch of changes.
-            unlink($sImportFile);
             do {
                 $fCMDStartTime = time();
-                $iNextSeq = (int) $aLastState['sequence_id'] + 1;
+                $iNextSeq = (int) $aLastState['sequence_id'];
                 unset($aOutput);
                 echo "$sCMDDownload -I $iNextSeq\n";
+                unlink($sImportFile);
                 exec($sCMDDownload.' -I '.$iNextSeq, $aOutput, $iResult);
 
                 if ($iResult == 3) {