r50068 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50067‎ | r50068 | r50069 >
Date:05:52, 30 April 2009
Author:tstarling
Status:deferred
Tags:
Comment:
Assorted minor live patches to command-line scripts.
Modified paths:
  • /trunk/phase3/includes/ForkController.php (modified) (history)
  • /trunk/phase3/maintenance/gearman/gearman.inc (modified) (history)
  • /trunk/phase3/maintenance/namespaceDupes.php (modified) (history)
  • /trunk/phase3/maintenance/storage/trackBlobs.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/storage/trackBlobs.php
@@ -12,6 +12,7 @@
1313 }
1414 $tracker = new TrackBlobs( $args );
1515 $tracker->run();
 16+echo "All done.\n";
1617
1718 class TrackBlobs {
1819 var $clusters, $textClause;
@@ -263,6 +264,10 @@
264265 if ( is_null( $table ) ) {
265266 $table = 'blobs';
266267 }
 268+ if ( !$extDB->tableExists( $table ) ) {
 269+ echo "No blobs table on cluster $cluster\n";
 270+ continue;
 271+ }
267272 $startId = 0;
268273 $batchesDone = 0;
269274 $actualBlobs = gmp_init( 0 );
Index: trunk/phase3/maintenance/gearman/gearman.inc
@@ -12,7 +12,7 @@
1313 socket_close( $this->conn );
1414
1515 # Close some more sockets
16 - wfGetLBFactory()->shutdown();
 16+ LBFactory::destroyInstance();
1717 global $wgMemc;
1818 $wgMemc->disconnect_all();
1919
Index: trunk/phase3/maintenance/namespaceDupes.php
@@ -37,7 +37,7 @@
3838 --prefix=<text> : Do an explicit check for the given title prefix
3939 in place of the standard namespace list.
4040 --verbose : Display output for checked namespaces without conflicts
41 -
 41+ --wiki=<wiki> : enter the wiki database to edit
4242 ENDS;
4343 die;
4444 }
Index: trunk/phase3/includes/ForkController.php
@@ -80,9 +80,11 @@
8181 } elseif ( pcntl_wifexited( $status ) ) {
8282 // Restart on non-zero exit status
8383 $exitStatus = pcntl_wexitstatus( $status );
84 - if ( $exitStatus > 0 ) {
 84+ if ( $exitStatus != 0 ) {
8585 echo "Worker exited with status $exitStatus, restarting\n";
8686 $this->procsToStart++;
 87+ } else {
 88+ echo "Worker exited normally\n";
8789 }
8890 }
8991 }

Status & tagging log