X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpopulateChangeTagDef.php;h=6c465977ade88a6c91cdd3f7038bf905880ad6ce;hb=3599ce72b0fe2594bd3ae8c902555040b8a91d28;hp=7bec25ac975a78c0f5d24b0c740289b4b64b1214;hpb=0c045de899977975884aa93f3f4e2642dd175f83;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/populateChangeTagDef.php b/maintenance/populateChangeTagDef.php index 7bec25ac97..6c465977ad 100644 --- a/maintenance/populateChangeTagDef.php +++ b/maintenance/populateChangeTagDef.php @@ -34,7 +34,7 @@ class PopulateChangeTagDef extends LoggedUpdateMaintenance { $this->setBatchSize( 1000 ); $this->addOption( 'sleep', - 'Sleep time (in seconds) between every batch', + 'Sleep time (in seconds) between every batch, defaults to zero', false, true ); @@ -42,16 +42,6 @@ class PopulateChangeTagDef extends LoggedUpdateMaintenance { $this->addOption( 'set-user-tags-only', 'Only update ctd_user_defined from valid_tag table' ); } - public function execute() { - global $wgChangeTagsSchemaMigrationStage; - if ( $wgChangeTagsSchemaMigrationStage === MIGRATION_OLD ) { - // Return "success", but don't flag it as done so the next run will retry - $this->output( '... Not run, $wgChangeTagsSchemaMigrationStage === MIGRATION_OLD' . "\n" ); - return true; - } - return parent::execute(); - } - protected function doDBUpdates() { $this->lbFactory = MediaWiki\MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); $this->setBatchSize( $this->getOption( 'batch-size', $this->getBatchSize() ) ); @@ -207,7 +197,7 @@ class PopulateChangeTagDef extends LoggedUpdateMaintenance { private function backpopulateChangeTagPerTag( $tagName, $tagId ) { $dbr = $this->lbFactory->getMainLB()->getConnection( DB_REPLICA ); $dbw = $this->lbFactory->getMainLB()->getConnection( DB_MASTER ); - $sleep = (int)$this->getOption( 'sleep', 10 ); + $sleep = (int)$this->getOption( 'sleep', 0 ); $lastId = 0; $this->output( "Starting to add ct_tag_id = {$tagId} for ct_tag = {$tagName}\n" ); while ( true ) {