diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2012-05-03 13:01:35 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2012-05-03 13:01:35 +0200 |
commit | d9022f63880ce039446fba8364f68e656b7bf4cb (patch) | |
tree | 16b40fbf17bf7c9ee6f4ead25b16dd192378050a /maintenance/nextJobDB.php | |
parent | 27cf83d177256813e2e802241085fce5dd0f3fb9 (diff) |
Update to MediaWiki 1.19.0
Diffstat (limited to 'maintenance/nextJobDB.php')
-rw-r--r-- | maintenance/nextJobDB.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/maintenance/nextJobDB.php b/maintenance/nextJobDB.php index 2d3608d5..67aa3088 100644 --- a/maintenance/nextJobDB.php +++ b/maintenance/nextJobDB.php @@ -37,7 +37,7 @@ class nextJobDB extends Maintenance { $memcKey = 'jobqueue:dbs:v2'; $pendingDBs = $wgMemc->get( $memcKey ); - // If the cache entry wasn't present, or in 1% of cases otherwise, + // If the cache entry wasn't present, or in 1% of cases otherwise, // regenerate the cache. if ( !$pendingDBs || mt_rand( 0, 100 ) == 0 ) { $pendingDBs = $this->getPendingDbs(); @@ -65,7 +65,7 @@ class nextJobDB extends Maintenance { $candidates = array_values( $candidates ); $db = $candidates[ mt_rand( 0, count( $candidates ) - 1 ) ]; if ( !$this->checkJob( $type, $db ) ) { - // This job is not available in the current database. Remove it from + // This job is not available in the current database. Remove it from // the cache. if ( $type === false ) { foreach ( $pendingDBs as $type2 => $dbs ) { @@ -85,7 +85,10 @@ class nextJobDB extends Maintenance { /** * Check if the specified database has a job of the specified type in it. - * The type may be false to indicate "all". + * The type may be false to indicate "all". + * @param $type string + * @param $dbName string + * @return bool */ function checkJob( $type, $dbName ) { $lb = wfGetLB( $dbName ); @@ -103,7 +106,6 @@ class nextJobDB extends Maintenance { /** * Get all databases that have a pending job - * @param $type String Job type * @return array */ private function getPendingDbs() { |