From: Max Semenik Date: Sat, 4 Nov 2017 23:10:06 +0000 (-0700) Subject: Use Maintenance::setBatchSize() everywhere X-Git-Tag: 1.31.0-rc.0~1591^2~1 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=5808276de3824fc918a096edfffc7c5c14a15249;p=lhc%2Fweb%2Fwiklou.git Use Maintenance::setBatchSize() everywhere Change-Id: Id48b95c547ddd8ea02fb1c577203f17056f38402 --- diff --git a/maintenance/copyFileBackend.php b/maintenance/copyFileBackend.php index 4f625fc69a..e2e6c6c366 100644 --- a/maintenance/copyFileBackend.php +++ b/maintenance/copyFileBackend.php @@ -109,7 +109,7 @@ class CopyFileBackend extends Maintenance { foreach ( $srcPathsRel as $srcPathRel ) { // Check up on the rate file periodically to adjust the concurrency if ( $rateFile && ( !$count || ( $count % 500 ) == 0 ) ) { - $this->mBatchSize = max( 1, (int)file_get_contents( $rateFile ) ); + $this->setBatchSize( max( 1, (int)file_get_contents( $rateFile ) ) ); $this->output( "\tBatch size is now {$this->mBatchSize}.\n" ); } $batchPaths[$srcPathRel] = 1; // remove duplicates @@ -136,7 +136,7 @@ class CopyFileBackend extends Maintenance { foreach ( $delPathsRel as $delPathRel ) { // Check up on the rate file periodically to adjust the concurrency if ( $rateFile && ( !$count || ( $count % 500 ) == 0 ) ) { - $this->mBatchSize = max( 1, (int)file_get_contents( $rateFile ) ); + $this->setBatchSize( max( 1, (int)file_get_contents( $rateFile ) ) ); $this->output( "\tBatch size is now {$this->mBatchSize}.\n" ); } $batchPaths[$delPathRel] = 1; // remove duplicates diff --git a/maintenance/deleteSelfExternals.php b/maintenance/deleteSelfExternals.php index ed15fd13b3..f76325bc32 100644 --- a/maintenance/deleteSelfExternals.php +++ b/maintenance/deleteSelfExternals.php @@ -33,7 +33,7 @@ class DeleteSelfExternals extends Maintenance { public function __construct() { parent::__construct(); $this->addDescription( 'Delete self-references to $wgServer from externallinks' ); - $this->mBatchSize = 1000; + $this->setBatchSize( 1000 ); } public function execute() {