Dzahn has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/209321

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikistats 
refs/changes/21/209321/1

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: newchange
Gerrit-Change-Id: I17c62e1b31ea0655bd50dfc2f17f9f145a4cb28a
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Dzahn <[email protected]>

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

Reply via email to