X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FfindMissingFiles.php;h=8bf2bdb457cdc9b8745288af2620a052ce61ef93;hb=dac20d0ffab5a850563d3fb02331a927e42a2bd9;hp=4ce7ca68ae60d70323d57d04e90d3695cd8f8a9a;hpb=942446575486057b38e186a8f5599a645758b702;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/findMissingFiles.php b/maintenance/findMissingFiles.php index 4ce7ca68ae..8bf2bdb457 100644 --- a/maintenance/findMissingFiles.php +++ b/maintenance/findMissingFiles.php @@ -37,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 ) ); @@ -66,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 ); @@ -101,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 ) { @@ -110,7 +111,7 @@ class FindMissingFiles extends Maintenance { } } } - } while ( $res->numRows() >= $this->mBatchSize ); + } while ( $res->numRows() >= $batchSize ); } }