Index: branches/wmf/1.17wmf1/maintenance/nextJobDB.php |
— | — | @@ -62,6 +62,7 @@ |
63 | 63 | return; |
64 | 64 | } |
65 | 65 | |
| 66 | + $candidates = array_values( $candidates ); |
66 | 67 | $db = $candidates[ mt_rand( 0, count( $candidates ) - 1 ) ]; |
67 | 68 | if ( !$this->checkJob( $type, $db ) ) { |
68 | 69 | // This job is not available in the current database. Remove it from |
— | — | @@ -86,9 +87,9 @@ |
87 | 88 | * Check if the specified database has a job of the specified type in it. |
88 | 89 | * The type may be false to indicate "all". |
89 | 90 | */ |
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 ); |
93 | 94 | if ( $type === false ) { |
94 | 95 | $conds = array(); |
95 | 96 | } else { |
Property changes on: branches/wmf/1.17wmf1/maintenance/nextJobDB.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
96 | 97 | Merged /trunk/phase3/maintenance/nextJobDB.php:r83636 |