Dzahn has submitted this change and it was merged.

Change subject: update.php: do not update timestamp on errors
......................................................................


update.php: do not update timestamp on errors

Only update the timestamp in the database when actions (update, import,
conversion) are successful. Do not update the timestamp on errors.

Bug:T46145
Change-Id: I17c62e1b31ea0655bd50dfc2f17f9f145a4cb28a
---
M usr/lib/wikistats/update.php
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Dzahn: Verified; Looks good to me, approved



diff --git a/usr/lib/wikistats/update.php b/usr/lib/wikistats/update.php
index 5e1beba..8249152 100644
--- a/usr/lib/wikistats/update.php
+++ b/usr/lib/wikistats/update.php
@@ -482,15 +482,15 @@
         break;
         case 1:
             print "---> ERROR - fetching via HTTP failed: id ".$row['id']." 
(${url}) \n\n";
-            $updatequery="update ${table} set http=\"${statuscode}\",ts=NOW() 
where id=\"".$row['id']."\";";
+            $updatequery="update ${table} set http=\"${statuscode}\" where 
id=\"".$row['id']."\";";
         break;
         case 2:
             print "---> ERROR - parsing failed for: id ".$row['id']." (${url}) 
\n\n";
-            $updatequery="update ${table} set http=\"${statuscode}\",ts=NOW() 
where id=\"".$row['id']."\";";
+            $updatequery="update ${table} set http=\"${statuscode}\" where 
id=\"".$row['id']."\";";
         break;
     default:
         print "---> ERROR - unexpected error for: id ".$row['id']." (${url}) 
HTTP: ${statuscode} \n\n";
-        $updatequery="update ${table} set http=\"${statuscode}\",ts=NOW() 
where id=\"".$row['id']."\";";
+        $updatequery="update ${table} set http=\"${statuscode}\" where 
id=\"".$row['id']."\";";
     break;
     }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/209321
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I17c62e1b31ea0655bd50dfc2f17f9f145a4cb28a
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Dzahn <[email protected]>
Gerrit-Reviewer: Dzahn <[email protected]>
Gerrit-Reviewer: Nemo bis <[email protected]>
Gerrit-Reviewer: RobiH <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to