}
} while ( $again );
- $this->output( $db . "\n" );
+ if ( $this->hasOption( 'types' ) ) {
+ $this->output( $db . " " . $type . "\n" );
+ } else {
+ $this->output( $db . "\n" );
+ }
}
+ private function delistDB( array $pendingDBs, $db, $type ) {
+ if ( $type === false ) {
+ // There are no jobs available in the current database
+ foreach ( $pendingDBs as $type2 => $dbs ) {
+ $pendingDBs[$type2] = array_diff( $pendingDBs[$type2], array( $db ) );
+ }
+ } else {
+ // There are no jobs of this type available in the current database
+ $pendingDBs[$type] = array_diff( $pendingDBs[$type], array( $db ) );
+ }
+ return $pendingDBs;
+ }
+
/**
* Check if the specified database has a job of the specified type in it.
* The type may be false to indicate "all".