Hoo man has uploaded a new change for review.

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

Change subject: More error logging for dumpwikidata
......................................................................

More error logging for dumpwikidata

Not sure this is needed, but seems useful to have.

Change-Id: I42c2a51fa4580f4c848fe55c5833017cee79a5e8
---
M modules/snapshot/files/cron/dumpwikidatajson.sh
M modules/snapshot/files/cron/dumpwikidatattl.sh
2 files changed, 10 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/51/311551/1

diff --git a/modules/snapshot/files/cron/dumpwikidatajson.sh 
b/modules/snapshot/files/cron/dumpwikidatajson.sh
index d3bfa61..42644e1 100644
--- a/modules/snapshot/files/cron/dumpwikidatajson.sh
+++ b/modules/snapshot/files/cron/dumpwikidatajson.sh
@@ -27,8 +27,11 @@
        while [ $i -lt $shards ]; do
                (
                        set -o pipefail
-                       php $multiversionscript 
extensions/Wikidata/extensions/Wikibase/repo/maintenance/dumpJson.php --wiki 
wikidatawiki --shard $i --sharding-factor $shards --snippet 2>> 
/var/log/wikidatadump/dumpwikidatajson-$filename-$i.log | gzip > 
$tempDir/wikidataJson.$i.gz
-                       if [ $? -gt 0 ]; then
+                       
errorLog=/var/log/wikidatadump/dumpwikidatajson-$filename-$i.log
+                       php $multiversionscript 
extensions/Wikidata/extensions/Wikibase/repo/maintenance/dumpJson.php --wiki 
wikidatawiki --shard $i --sharding-factor $shards --snippet 2>> $errorLog | 
gzip > $tempDir/wikidataJson.$i.gz
+                       exitCode=$?
+                       if [ $exitCode -gt 0 ]; then
+                               echo -e "\n\nProcess failed with exit code 
$exitCode" >> $errorLog
                                echo 1 > $failureFile
                        fi
                ) &
diff --git a/modules/snapshot/files/cron/dumpwikidatattl.sh 
b/modules/snapshot/files/cron/dumpwikidatattl.sh
index 3474ebc..06eb9ef 100644
--- a/modules/snapshot/files/cron/dumpwikidatattl.sh
+++ b/modules/snapshot/files/cron/dumpwikidatattl.sh
@@ -27,8 +27,11 @@
        while [ $i -lt $shards ]; do
                (
                        set -o pipefail
-                       php $multiversionscript 
extensions/Wikidata/extensions/Wikibase/repo/maintenance/dumpRdf.php --wiki 
wikidatawiki --shard $i --sharding-factor $shards --format ttl 2>> 
/var/log/wikidatadump/dumpwikidatattl-$filename-$i.log | gzip > 
$tempDir/wikidataTTL.$i.gz
-                       if [ $? -gt 0 ]; then
+                       
errorLog=/var/log/wikidatadump/dumpwikidatattl-$filename-$i.log
+                       php $multiversionscript 
extensions/Wikidata/extensions/Wikibase/repo/maintenance/dumpRdf.php --wiki 
wikidatawiki --shard $i --sharding-factor $shards --format ttl 2>> $errorLog | 
gzip > $tempDir/wikidataTTL.$i.gz
+                       exitCode=$?
+                       if [ $exitCode -gt 0 ]; then
+                               echo -e "\n\nProcess failed with exit code 
$exitCode" >> $errorLog
                                echo 1 > $failureFile
                        fi
                ) &

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I42c2a51fa4580f4c848fe55c5833017cee79a5e8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hoo man <h...@online.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to