r83636 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83635‎ | r83636 | r83637 >
Date:04:47, 10 March 2011
Author:tstarling
Status:ok
Tags:
Comment:
Some bug fixes for r83634.
Modified paths:
  • /trunk/phase3/maintenance/nextJobDB.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/nextJobDB.php
@@ -62,6 +62,7 @@
6363 return;
6464 }
6565
 66+ $candidates = array_values( $candidates );
6667 $db = $candidates[ mt_rand( 0, count( $candidates ) - 1 ) ];
6768 if ( !$this->checkJob( $type, $db ) ) {
6869 // This job is not available in the current database. Remove it from
@@ -86,9 +87,9 @@
8788 * Check if the specified database has a job of the specified type in it.
8889 * The type may be false to indicate "all".
8990 */
90 - function checkJob( $type, $db ) {
91 - $lb = wfGetLB( $db );
92 - $db = $lb->getConnection( DB_MASTER );
 91+ function checkJob( $type, $dbName ) {
 92+ $lb = wfGetLB( $dbName );
 93+ $db = $lb->getConnection( DB_MASTER, array(), $dbName );
9394 if ( $type === false ) {
9495 $conds = array();
9596 } else {

Follow-up revisions

RevisionCommit summaryAuthorDate
r83637MFT r83636: some bug fixes (already live)tstarling04:48, 10 March 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r83634Rewrite the caching code in nextJobDB.php so that jobs-loop.sh has a chance o...tstarling04:10, 10 March 2011

Status & tagging log