X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FcopyJobQueue.php;h=dc70e9c20329402687b548f4058e6c9bb9785a99;hp=e1d697d88de91a7dd5963424acd716215ebd78ef;hb=93b235b2d39093943b539dbbf0bd216dca737ad7;hpb=b5906606e1aa1a795231fb813b766818b1dd6c25 diff --git a/maintenance/copyJobQueue.php b/maintenance/copyJobQueue.php index e1d697d88d..dc70e9c203 100644 --- a/maintenance/copyJobQueue.php +++ b/maintenance/copyJobQueue.php @@ -48,9 +48,9 @@ class CopyJobQueue extends Maintenance { $dstKey = $this->getOption( 'dst' ); if ( !isset( $wgJobQueueMigrationConfig[$srcKey] ) ) { - $this->error( "\$wgJobQueueMigrationConfig not set for '$srcKey'.", 1 ); + $this->fatalError( "\$wgJobQueueMigrationConfig not set for '$srcKey'." ); } elseif ( !isset( $wgJobQueueMigrationConfig[$dstKey] ) ) { - $this->error( "\$wgJobQueueMigrationConfig not set for '$dstKey'.", 1 ); + $this->fatalError( "\$wgJobQueueMigrationConfig not set for '$dstKey'." ); } $types = ( $this->getOption( 'type' ) === 'all' ) @@ -77,7 +77,7 @@ class CopyJobQueue extends Maintenance { foreach ( $jobs as $job ) { ++$total; $batch[] = $job; - if ( count( $batch ) >= $this->mBatchSize ) { + if ( count( $batch ) >= $this->getBatchSize() ) { $dst->push( $batch ); $totalOK += count( $batch ); $batch = []; @@ -94,5 +94,5 @@ class CopyJobQueue extends Maintenance { } } -$maintClass = 'CopyJobQueue'; +$maintClass = CopyJobQueue::class; require_once RUN_MAINTENANCE_IF_MAIN;