$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' )
? JobQueueGroup::singleton()->getQueueTypes()
: [ $this->getOption( 'type' ) ];
+ $dbDomain = WikiMap::getCurrentWikiDbDomain()->getId();
foreach ( $types as $type ) {
- $baseConfig = [ 'type' => $type, 'wiki' => wfWikiID() ];
+ $baseConfig = [ 'type' => $type, 'domain' => $dbDomain ];
$src = JobQueue::factory( $baseConfig + $wgJobQueueMigrationConfig[$srcKey] );
$dst = JobQueue::factory( $baseConfig + $wgJobQueueMigrationConfig[$dstKey] );
}
}
-$maintClass = 'CopyJobQueue';
+$maintClass = CopyJobQueue::class;
require_once RUN_MAINTENANCE_IF_MAIN;