- list( $type, $db ) = $candidates[ mt_rand( 0, count( $candidates ) - 1 ) ];
- if ( !$this->checkJob( $type, $db ) ) { // queue is actually empty?
- $pendingDBs[$type] = array_diff( $pendingDBs[$type], $db );
- JobQueueAggregator::singleton()->notifyQueueEmpty( $db, $type );
+ list( $type, $db ) = $candidates[mt_rand( 0, count( $candidates ) - 1 )];
+ if ( JobQueueGroup::singleton( $db )->isQueueDeprioritized( $type ) ) {
+ $pendingDBs[$type] = array_diff( $pendingDBs[$type], array( $db ) );