fix the following message error :
Fatal error: Call to undefined function wfWaitForSlaves() in maintenance/populateCategory.inc on line 66
This wfWaitForSlaves() function exists only in commandLine.inc but updater can't call it when not using command line tool.
Adding this function in the end of populateCategory.inc.
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();
+ }
+ }
+}