class BatchedQueryRunner extends Maintenance {
public function __construct() {
parent::__construct();
- $this->mDescription =
+ $this->addDescription(
"Run a query repeatedly until it affects 0 rows, and wait for slaves in between.\n" .
- "NOTE: You need to set a LIMIT clause yourself.";
+ "NOTE: You need to set a LIMIT clause yourself." );
}
public function execute() {
$query = $this->getArg();
$n = 1;
- $dbw = wfGetDB( DB_MASTER );
+ $dbw = $this->getDB( DB_MASTER );
do {
$this->output( "Batch $n: " );
$n++;