X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FfindMissingFiles.php;h=8bf2bdb457cdc9b8745288af2620a052ce61ef93;hb=e3a869de07016defcf87ed014b6a6ddf986c6732;hp=7979e7d3c1e0e46d942bf79093a78cd086296102;hpb=de19ed182376b5441dff471321b5165f40111a2d;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/findMissingFiles.php b/maintenance/findMissingFiles.php index 7979e7d3c1..8bf2bdb457 100644 --- a/maintenance/findMissingFiles.php +++ b/maintenance/findMissingFiles.php @@ -16,7 +16,6 @@ * http://www.gnu.org/copyleft/gpl.html * * @file - * @author Aaron Schulz */ require_once __DIR__ . '/Maintenance.php'; @@ -38,6 +37,7 @@ class FindMissingFiles extends Maintenance { $repo = RepoGroup::singleton()->getLocalRepo(); $dbr = $repo->getReplicaDB(); $be = $repo->getBackend(); + $batchSize = $this->getBatchSize(); $mtime1 = $dbr->timestampOrNull( $this->getOption( 'mtimeafter', null ) ); $mtime2 = $dbr->timestampOrNull( $this->getOption( 'mtimebefore', null ) ); @@ -67,7 +67,7 @@ class FindMissingFiles extends Maintenance { __METHOD__, // DISTINCT causes a pointless filesort [ 'ORDER BY' => 'name', 'GROUP BY' => 'name', - 'LIMIT' => $this->mBatchSize ], + 'LIMIT' => $batchSize ], $joinConds ); @@ -102,7 +102,7 @@ class FindMissingFiles extends Maintenance { $checkPaths[] = $file->getPath(); } - foreach ( array_chunk( $checkPaths, $this->mBatchSize ) as $paths ) { + foreach ( array_chunk( $checkPaths, $batchSize ) as $paths ) { $be->preloadFileStat( [ 'srcs' => $paths ] ); foreach ( $paths as $path ) { if ( $be->fileExists( [ 'src' => $path ] ) === false ) { @@ -111,7 +111,7 @@ class FindMissingFiles extends Maintenance { } } } - } while ( $res->numRows() >= $this->mBatchSize ); + } while ( $res->numRows() >= $batchSize ); } }