public function execute() {
global $wgQueryCacheLimit, $wgDisableQueryPageUpdate;
- $dbw = wfGetDB( DB_MASTER );
+ $dbw = $this->getDB( DB_MASTER );
$this->doSpecialPageCacheUpdates( $dbw );
if ( $specialObj instanceof QueryPage ) {
$queryPage = $specialObj;
} else {
- if ( !class_exists( $class ) ) {
- $file = $specialObj->getFile();
- require_once $file;
- }
- $queryPage = new $class;
+ $class = get_class( $specialObj );
+ $this->error( "$class is not an instance of QueryPage.\n", 1 );
+ die;
}
if ( !$this->hasOption( 'only' ) || $this->getOption( 'only' ) == $queryPage->getName() ) {
} while ( !wfGetLB()->pingAll() );
$this->output( "Reconnected\n\n" );
}
- # Wait for the slave to catch up
+ # Wait for the replica DB to catch up
wfWaitForSlaves();
} else {
$this->output( "cheap, skipped\n" );
$this->output( $minutes . 'm ' );
}
$this->output( sprintf( "%.2fs\n", $seconds ) );
- # Wait for the slave to catch up
+ # Wait for the replica DB to catch up
wfWaitForSlaves();
}
}