updates: always remove output file and start with correct sequence id

This commit is contained in:
Sarah Hoffmann
2017-05-27 17:02:34 +02:00
parent 86acaa5264
commit 1876fe42c9

View File

@@ -262,12 +262,12 @@ if ($aResult['import-osmosis'] || $aResult['import-osmosis-all']) {
} }
// Download the next batch of changes. // Download the next batch of changes.
unlink($sImportFile);
do { do {
$fCMDStartTime = time(); $fCMDStartTime = time();
$iNextSeq = (int) $aLastState['sequence_id'] + 1; $iNextSeq = (int) $aLastState['sequence_id'];
unset($aOutput); unset($aOutput);
echo "$sCMDDownload -I $iNextSeq\n"; echo "$sCMDDownload -I $iNextSeq\n";
unlink($sImportFile);
exec($sCMDDownload.' -I '.$iNextSeq, $aOutput, $iResult); exec($sCMDDownload.' -I '.$iNextSeq, $aOutput, $iResult);
if ($iResult == 3) { if ($iResult == 3) {