$repo = RepoGroup::singleton()->getLocalRepo();
$tempRepo = $repo->getTempRepo();
- $dbr = $repo->getSlaveDB();
+ $dbr = $repo->getReplicaDB();
// how far back should this look for files to delete?
$cutoff = time() - $wgUploadStashMaxAge;
foreach ( $iterator as $file ) {
if ( wfTimestamp( TS_UNIX, $tempRepo->getFileTimestamp( "$dir/$file" ) ) < $cutoff ) {
$batch[] = [ 'op' => 'delete', 'src' => "$dir/$file" ];
- if ( count( $batch ) >= $this->mBatchSize ) {
+ if ( count( $batch ) >= $this->getBatchSize() ) {
$this->doOperations( $tempRepo, $batch );
$i += count( $batch );
$batch = [];
foreach ( $iterator as $file ) {
if ( wfTimestamp( TS_UNIX, $tempRepo->getFileTimestamp( "$dir/$file" ) ) < $cutoff ) {
$batch[] = [ 'op' => 'delete', 'src' => "$dir/$file" ];
- if ( count( $batch ) >= $this->mBatchSize ) {
+ if ( count( $batch ) >= $this->getBatchSize() ) {
$this->doOperations( $tempRepo, $batch );
$i += count( $batch );
$batch = [];