From 84d1e521aac266175c039712aa5a03e5701a3cfa Mon Sep 17 00:00:00 2001 From: IrlJidel Date: Mon, 30 Sep 2013 13:25:30 +0100 Subject: [PATCH] show import_osmosis_log insert statements, print completed log after import_status inserts --- utils/update.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/utils/update.php b/utils/update.php index ac7b5be8..069d9e72 100755 --- a/utils/update.php +++ b/utils/update.php @@ -431,9 +431,10 @@ } $iFileSize = filesize($sImportFile); $sBatchEnd = getosmosistimestamp($sOsmosisConfigDirectory); - echo "Completed for $sBatchEnd in ".round((time()-$fCMDStartTime)/60,2)." minutes\n"; $sSQL = "INSERT INTO import_osmosis_log values ('$sBatchEnd',$iFileSize,'".date('Y-m-d H:i:s',$fCMDStartTime)."','".date('Y-m-d H:i:s')."','osmosis')"; + var_Dump($sSQL); $oDB->query($sSQL); + echo "Completed for $sBatchEnd in ".round((time()-$fCMDStartTime)/60,2)." minutes\n"; } $iFileSize = filesize($sImportFile); @@ -452,6 +453,7 @@ $sSQL = "INSERT INTO import_osmosis_log values ('$sBatchEnd',$iFileSize,'".date('Y-m-d H:i:s',$fCMDStartTime)."','".date('Y-m-d H:i:s')."','osm2pgsql')"; var_Dump($sSQL); $oDB->query($sSQL); + echo "Completed for $sBatchEnd in ".round((time()-$fCMDStartTime)/60,2)." minutes\n"; // Archive for debug? unlink($sImportFile); @@ -461,7 +463,7 @@ // Index file $sThisIndexCmd = $sCMDIndex; - $fCMDStartTime = time(); + $fCMDStartTime = time(); if (!$aResult['no-npi']) { @@ -519,9 +521,10 @@ } } - echo "Completed for $sBatchEnd in ".round((time()-$fCMDStartTime)/60,2)." minutes\n"; $sSQL = "INSERT INTO import_osmosis_log values ('$sBatchEnd',$iFileSize,'".date('Y-m-d H:i:s',$fCMDStartTime)."','".date('Y-m-d H:i:s')."','index')"; + var_Dump($sSQL); $oDB->query($sSQL); + echo "Completed for $sBatchEnd in ".round((time()-$fCMDStartTime)/60,2)." minutes\n"; $sSQL = "update import_status set lastimportdate = '$sBatchEnd'"; $oDB->query($sSQL); -- 2.39.5