From: Tim Starling Date: Sat, 30 Dec 2006 16:44:31 +0000 (+0000) Subject: Added configuration global $wgDisableQueryPageUpdate to disable certain pages from... X-Git-Tag: 1.31.0-rc.0~54727 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=c7b8ba46f8759ff8305f994fe638e6e5c63313d5;p=lhc%2Fweb%2Fwiklou.git Added configuration global $wgDisableQueryPageUpdate to disable certain pages from being run in updateSpecialPages.php --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 640642e9c0..01acc5138c 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2347,4 +2347,10 @@ $wgParserTestFiles = array( */ $wgBreakFrames = false; +/** + * Set this to an array of special page names to prevent + * maintenance/updateSpecialPages.php from updating those pages. + */ +$wgDisableQueryPageUpdate = false; + ?> diff --git a/maintenance/updateSpecialPages.php b/maintenance/updateSpecialPages.php index ed06855a14..89b5aa94f6 100644 --- a/maintenance/updateSpecialPages.php +++ b/maintenance/updateSpecialPages.php @@ -28,6 +28,11 @@ foreach ( $wgQueryPages as $page ) { continue; } + if ( in_array( $special, $wgDisableQueryPageUpdate ) ) { + printf("%-30s disabled\n", $special); + continue; + } + $specialObj = SpecialPage::getPage( $special ); if ( !$specialObj ) { print "No such special page: $special\n"; @@ -40,7 +45,7 @@ foreach ( $wgQueryPages as $page ) { $queryPage = new $class; if( !(isset($options['only'])) or ($options['only'] == $queryPage->getName()) ) { - printf( '%-30s', $special ); + printf( '%-30s ', $special ); if ( $queryPage->isExpensive() ) { $t1 = explode( ' ', microtime() ); @@ -80,12 +85,15 @@ foreach ( $wgQueryPages as $page ) { } # Wait for the slave to catch up + /* $slaveDB =& wfGetDB( DB_SLAVE, array('QueryPage::recache', 'vslow' ) ); while( $slaveDB->getLag() > 600 ) { print "Slave lagged, waiting...\n"; sleep(30); } + */ + wfWaitForSlaves( 5 ); } else { print "cheap, skipped\n";