} 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";
}
}
}
socket_close( $this->conn );
# Close some more sockets
- wfGetLBFactory()->shutdown();
+ LBFactory::destroyInstance();
global $wgMemc;
$wgMemc->disconnect_all();
--prefix=<text> : 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=<wiki> : enter the wiki database to edit
ENDS;
die;
}
}
$tracker = new TrackBlobs( $args );
$tracker->run();
+echo "All done.\n";
class TrackBlobs {
var $clusters, $textClause;
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 );