From: Amir Sarabadani Date: Sat, 15 Dec 2018 17:28:54 +0000 (+0100) Subject: Set default of sleep time in populateChangeTagDef to zero X-Git-Tag: 1.34.0-rc.0~3238^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/Foo_bar_baz?a=commitdiff_plain;h=b6c2caf11d0587f3977a7720cf103226af25e37e;p=lhc%2Fweb%2Fwiklou.git Set default of sleep time in populateChangeTagDef to zero The script already has waitForReplication(), that's good for non-WMF setups Bug: T206568 Change-Id: I020a4472796eeff2561da6c17a817091d4e9af5a --- diff --git a/maintenance/populateChangeTagDef.php b/maintenance/populateChangeTagDef.php index 9594137de1..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 ); @@ -197,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 ) {