X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FcopyFileBackend.php;h=ee103b88484e475834064577e4ab387883f900b2;hb=eaea890a0966a31292f7ccafebaa7b04182abc73;hp=4f625fc69a83282c6747d41fadc59f8bbd415e92;hpb=2ab61690b27a6fa0f4b81909cdd0709d9de38dbe;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/copyFileBackend.php b/maintenance/copyFileBackend.php index 4f625fc69a..ee103b8848 100644 --- a/maintenance/copyFileBackend.php +++ b/maintenance/copyFileBackend.php @@ -109,11 +109,11 @@ 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->output( "\tBatch size is now {$this->mBatchSize}.\n" ); + $this->setBatchSize( max( 1, (int)file_get_contents( $rateFile ) ) ); + $this->output( "\tBatch size is now {$this->getBatchSize()}.\n" ); } $batchPaths[$srcPathRel] = 1; // remove duplicates - if ( count( $batchPaths ) >= $this->mBatchSize ) { + if ( count( $batchPaths ) >= $this->getBatchSize() ) { $this->copyFileBatch( array_keys( $batchPaths ), $backendRel, $src, $dst ); $batchPaths = []; // done } @@ -136,11 +136,11 @@ 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->output( "\tBatch size is now {$this->mBatchSize}.\n" ); + $this->setBatchSize( max( 1, (int)file_get_contents( $rateFile ) ) ); + $this->output( "\tBatch size is now {$this->getBatchSize()}.\n" ); } $batchPaths[$delPathRel] = 1; // remove duplicates - if ( count( $batchPaths ) >= $this->mBatchSize ) { + if ( count( $batchPaths ) >= $this->getBatchSize() ) { $this->delFileBatch( array_keys( $batchPaths ), $backendRel, $dst ); $batchPaths = []; // done }