diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-08-12 09:28:15 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-08-12 09:28:15 +0200 |
commit | 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 (patch) | |
tree | 577a29fb579188d16003a209ce2a2e9c5b0aa2bd /includes/db/LoadMonitor.php | |
parent | cacc939b34e315b85e2d72997811eb6677996cc1 (diff) |
Update to MediaWiki 1.21.1
Diffstat (limited to 'includes/db/LoadMonitor.php')
-rw-r--r-- | includes/db/LoadMonitor.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/includes/db/LoadMonitor.php b/includes/db/LoadMonitor.php index 146ac61e..ad7b3b2f 100644 --- a/includes/db/LoadMonitor.php +++ b/includes/db/LoadMonitor.php @@ -37,7 +37,7 @@ interface LoadMonitor { /** * Perform pre-connection load ratio adjustment. * @param $loads array - * @param $group String: the selected query group + * @param string $group the selected query group * @param $wiki String */ function scaleLoads( &$loads, $group = false, $wiki = false ); @@ -159,7 +159,7 @@ class LoadMonitor_MySQL implements LoadMonitor { $times = array(); foreach ( $serverIndexes as $i ) { - if ($i == 0) { # Master + if ( $i == 0 ) { # Master $times[$i] = 0; } elseif ( false !== ( $conn = $this->parent->getAnyOpenConnection( $i ) ) ) { $times[$i] = $conn->getLag(); @@ -173,7 +173,7 @@ class LoadMonitor_MySQL implements LoadMonitor { $wgMemc->set( $memcKey, $times, $expiry ); # But don't give the timestamp to the caller - unset($times['timestamp']); + unset( $times['timestamp'] ); $lagTimes = $times; wfProfileOut( __METHOD__ ); @@ -189,7 +189,7 @@ class LoadMonitor_MySQL implements LoadMonitor { if ( !$threshold ) { return 0; } - $status = $conn->getMysqlStatus("Thread%"); + $status = $conn->getMysqlStatus( "Thread%" ); if ( $status['Threads_running'] > $threshold ) { $server = $conn->getProperty( 'mServer' ); wfLogDBError( "LB backoff from $server - Threads_running = {$status['Threads_running']}\n" ); @@ -199,4 +199,3 @@ class LoadMonitor_MySQL implements LoadMonitor { } } } - |