diff options
Diffstat (limited to 'MLEB/Translate/src/Synchronization/CompleteExternalTranslationMaintenanceScript.php')
-rw-r--r-- | MLEB/Translate/src/Synchronization/CompleteExternalTranslationMaintenanceScript.php | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/MLEB/Translate/src/Synchronization/CompleteExternalTranslationMaintenanceScript.php b/MLEB/Translate/src/Synchronization/CompleteExternalTranslationMaintenanceScript.php index eb8ce627..0e3f46ea 100644 --- a/MLEB/Translate/src/Synchronization/CompleteExternalTranslationMaintenanceScript.php +++ b/MLEB/Translate/src/Synchronization/CompleteExternalTranslationMaintenanceScript.php @@ -4,10 +4,12 @@ declare( strict_types = 1 ); namespace MediaWiki\Extension\Translate\Synchronization; +use JobQueueGroup; use Maintenance; use MediaWiki\Extension\Translate\Services; use MediaWiki\Logger\LoggerFactory; use MediaWiki\MediaWikiServices; +use MessageIndexRebuildJob; /** * @author Abijeet Patro @@ -42,10 +44,8 @@ class CompleteExternalTranslationMaintenanceScript extends Maintenance { $logger->info( 'Group synchronization is in progress' ); $groupsInProgress = []; - $groupResponses = []; foreach ( $groupsInSync as $groupId ) { $groupResponse = $groupSyncCache->getSynchronizationStatus( $groupId ); - $groupResponses[] = $groupResponse; if ( $groupResponse->isDone() ) { $groupSyncCache->endSync( $groupId ); @@ -79,6 +79,7 @@ class CompleteExternalTranslationMaintenanceScript extends Maintenance { if ( !$groupsInProgress ) { // No groups in progress. $logger->info( 'All message groups are now in sync.' ); + JobQueueGroup::singleton()->push( MessageIndexRebuildJob::newJob() ); } $logger->info( @@ -90,8 +91,3 @@ class CompleteExternalTranslationMaintenanceScript extends Maintenance { ); } } - -class_alias( - CompleteExternalTranslationMaintenanceScript::class, - '\MediaWiki\Extensions\Translate\CompleteExternalTranslationMaintenanceScript' -); |