From: Tim Starling Date: Thu, 30 Apr 2009 05:52:25 +0000 (+0000) Subject: Assorted minor live patches to command-line scripts. X-Git-Tag: 1.31.0-rc.0~41926 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=2ec95d3326ed3b7fb9af3b6b96b1b93efee6ecfd;p=lhc%2Fweb%2Fwiklou.git Assorted minor live patches to command-line scripts. --- diff --git a/includes/ForkController.php b/includes/ForkController.php index 09e1788bae..6a386995c3 100644 --- a/includes/ForkController.php +++ b/includes/ForkController.php @@ -80,9 +80,11 @@ class ForkController { } elseif ( pcntl_wifexited( $status ) ) { // Restart on non-zero exit status $exitStatus = pcntl_wexitstatus( $status ); - if ( $exitStatus > 0 ) { + if ( $exitStatus != 0 ) { echo "Worker exited with status $exitStatus, restarting\n"; $this->procsToStart++; + } else { + echo "Worker exited normally\n"; } } } diff --git a/maintenance/gearman/gearman.inc b/maintenance/gearman/gearman.inc index a2a4018aa3..514b9bacc3 100644 --- a/maintenance/gearman/gearman.inc +++ b/maintenance/gearman/gearman.inc @@ -12,7 +12,7 @@ class MWGearmanJob extends Net_Gearman_Job_Common { socket_close( $this->conn ); # Close some more sockets - wfGetLBFactory()->shutdown(); + LBFactory::destroyInstance(); global $wgMemc; $wgMemc->disconnect_all(); diff --git a/maintenance/namespaceDupes.php b/maintenance/namespaceDupes.php index 58615b6bf8..11623f486b 100644 --- a/maintenance/namespaceDupes.php +++ b/maintenance/namespaceDupes.php @@ -37,7 +37,7 @@ usage: namespaceDupes.php [--fix] [--suffix=] [--help] --prefix= : Do an explicit check for the given title prefix in place of the standard namespace list. --verbose : Display output for checked namespaces without conflicts - + --wiki= : enter the wiki database to edit ENDS; die; } diff --git a/maintenance/storage/trackBlobs.php b/maintenance/storage/trackBlobs.php index fbcc5bc2ef..8ac9474818 100644 --- a/maintenance/storage/trackBlobs.php +++ b/maintenance/storage/trackBlobs.php @@ -12,6 +12,7 @@ if ( count( $args ) < 1 ) { } $tracker = new TrackBlobs( $args ); $tracker->run(); +echo "All done.\n"; class TrackBlobs { var $clusters, $textClause; @@ -263,6 +264,10 @@ class TrackBlobs { if ( is_null( $table ) ) { $table = 'blobs'; } + if ( !$extDB->tableExists( $table ) ) { + echo "No blobs table on cluster $cluster\n"; + continue; + } $startId = 0; $batchesDone = 0; $actualBlobs = gmp_init( 0 );