require_once __DIR__ . '/Maintenance.php';
+use Wikimedia\Rdbms\ResultWrapper;
+
/**
* Maintenance script that sends purge requests for pages edited in a date
* range to squid/varnish.
}
}
- $dbr = $this->getDB( DB_SLAVE );
+ $dbr = $this->getDB( DB_REPLICA );
$minTime = $dbr->timestamp( $this->getOption( 'starttime' ) );
$maxTime = $dbr->timestamp( $this->getOption( 'endtime' ) );
$stuckCount = 0; // loop breaker
while ( true ) {
// Adjust bach size if we are stuck in a second that had many changes
- $bSize = $this->mBatchSize + ( $stuckCount * $this->mBatchSize );
+ $bSize = ( $stuckCount + 1 ) * $this->getBatchSize();
$res = $dbr->select(
[ 'page', 'revision' ],