From f34672bc877132b56f4d5b3e484a754eb516c62c Mon Sep 17 00:00:00 2001 From: Bertrand Grondin Date: Tue, 18 Mar 2008 12:42:22 +0000 Subject: [PATCH] *Fix bug when using Mediawiki updater command line. *Prevent redeclaring wfWaitForSlaves () --- maintenance/populateCategory.inc | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/maintenance/populateCategory.inc b/maintenance/populateCategory.inc index 905706ed39..497f4b5776 100644 --- a/maintenance/populateCategory.inc +++ b/maintenance/populateCategory.inc @@ -4,6 +4,8 @@ * @author Simetrical */ +require_once "commandLine.inc"; + define( 'REPORTING_INTERVAL', 1000 ); function populateCategory( $begin, $maxlag, $throttle, $force ) { @@ -82,19 +84,3 @@ function populateCategory( $begin, $maxlag, $throttle, $force ) { return false; } } - -function wfWaitForSlaves( $maxLag ) { - global $wgLoadBalancer; - if ( $maxLag ) { - list( $host, $lag ) = $wgLoadBalancer->getMaxLag(); - while ( $lag > $maxLag ) { - $name = @gethostbyaddr( $host ); - if ( $name !== false ) { - $host = $name; - } - print "Waiting for $host (lagged $lag seconds)...\n"; - sleep($maxLag); - list( $host, $lag ) = $wgLoadBalancer->getMaxLag(); - } - } -} -- 2.20.1