$lb = wfGetLB( $dbName );
$db = $lb->getConnection( DB_MASTER, array(), $dbName );
if ( $type === false ) {
- $conds = array();
+ $conds = Job::defaultQueueConditions( );
} else {
$conds = array( 'job_cmd' => $type );
}
+
$exists = (bool) $db->selectField( 'job', '1', $conds, __METHOD__ );
$lb->reuseConnection( $db );
return $exists;
/**
* Get all databases that have a pending job
- * @param $type String Job type
* @return array
*/
private function getPendingDbs() {