X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FupdateSpecialPages.php;h=3b28b657c53120c434b0c79dc03ccdfb93c6bfc7;hb=5c8ba9ebf4d9864a412ea5cea9a2105b0d126ef9;hp=3c4d1f9f82fd50e09eb6b0409f08c88b14b37f1b;hpb=5623d4c64319a98ddd8263c597002d173464ccbf;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/updateSpecialPages.php b/maintenance/updateSpecialPages.php index 3c4d1f9f82..3b28b657c5 100644 --- a/maintenance/updateSpecialPages.php +++ b/maintenance/updateSpecialPages.php @@ -25,7 +25,6 @@ require_once __DIR__ . '/Maintenance.php'; use MediaWiki\MediaWikiServices; -use Wikimedia\Rdbms\DBReplicationWaitError; /** * Maintenance script to update cached special pages. @@ -66,7 +65,8 @@ class UpdateSpecialPages extends Maintenance { continue; } - $specialObj = SpecialPageFactory::getPage( $special ); + $specialObj = MediaWikiServices::getInstance()->getSpecialPageFactory()-> + getPage( $special ); if ( !$specialObj ) { $this->output( "No such special page: $special\n" ); exit; @@ -84,7 +84,7 @@ class UpdateSpecialPages extends Maintenance { if ( $queryPage->isExpensive() ) { $t1 = microtime( true ); # Do the query - $num = $queryPage->recache( $limit === null ? $wgQueryCacheLimit : $limit ); + $num = $queryPage->recache( $limit ?? $wgQueryCacheLimit ); $t2 = microtime( true ); if ( $num === false ) { $this->output( "FAILED: database error\n" ); @@ -133,11 +133,7 @@ class UpdateSpecialPages extends Maintenance { $this->output( "Reconnected\n\n" ); } // Wait for the replica DB to catch up - try { - $lbFactory->waitForReplication(); - } catch ( DBReplicationWaitError $e ) { - // ignore - } + $lbFactory->waitForReplication(); } public function doSpecialPageCacheUpdates( $dbw ) {