X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FupdateSpecialPages.php;h=7e57f672b45b38684871b61a5d3a8f6b58e4efd2;hb=6d5d0c9fb78cb3d436051640af6bd4e8db574512;hp=12a454a255bbf60b12887a9fac3391604dd8ffc3;hpb=33afb7440a03df8d1878c94d2f3d3b9fdd1a848b;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/updateSpecialPages.php b/maintenance/updateSpecialPages.php index 12a454a255..7e57f672b4 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. @@ -43,14 +42,15 @@ class UpdateSpecialPages extends Maintenance { } public function execute() { - global $wgQueryCacheLimit, $wgDisableQueryPageUpdate; + global $wgQueryCacheLimit; $dbw = $this->getDB( DB_MASTER ); $this->doSpecialPageCacheUpdates( $dbw ); + $disabledQueryPages = QueryPage::getDisabledQueryPages( $this->getConfig() ); foreach ( QueryPage::getPages() as $page ) { - list( $class, $special ) = $page; + list( , $special ) = $page; $limit = $page[2] ?? null; # --list : just show the name of pages @@ -60,7 +60,7 @@ class UpdateSpecialPages extends Maintenance { } if ( !$this->hasOption( 'override' ) - && $wgDisableQueryPageUpdate && in_array( $special, $wgDisableQueryPageUpdate ) + && isset( $disabledQueryPages[$special] ) ) { $this->output( sprintf( "%-30s [QueryPage] disabled\n", $special ) ); continue; @@ -134,11 +134,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 ) {