Commit c5b45711 authored by Gary Wong's avatar Gary Wong

Fix OutstandingReservations so it actually looks at and obeys \@typelist.

parent f61bab43
......@@ -919,6 +919,8 @@ sub OutstandingReservation($$;$) {
join( "','", @$projlist ) . "')" );
while( my($type) = $query_result->fetchrow_array() ) {
next if( defined( $typelist ) && !grep( $_ eq $type, @$typelist ) );
my $reservations = LookupAll( $class, $type );
my @forecast = ();
......
......@@ -48,7 +48,7 @@ sub usage()
print STDERR " predict -c type [pid...]\n";
print STDERR " predict -l type [pid...]\n";
print STDERR " predict -P type [pid...]\n";
print STDERR " predict -x pid...\n";
print STDERR " predict -x [-T type] pid...\n";
print STDERR " -h This message\n";
print STDERR " -c Give an oversimplified free node count\n";
print STDERR " -l Give a list of node allocation status counts " .
......@@ -62,7 +62,7 @@ sub usage()
exit( -1 );
}
my $optlist = "cdhlpPt:x";
my $optlist = "cdhlpPt:T:x";
my $debug = 0;
my $time = time; # default to now
my $pidonly = 0;
......@@ -126,6 +126,9 @@ if (defined($options{"t"})) {
}
}
}
if (defined($options{T})) {
$type = $options{T};
}
if (defined($options{"c"})) {
$countonly = 1;
}
......@@ -175,7 +178,9 @@ if( $pressure ) {
}
if( $unfulfilled ) {
my $t = Reservation->OutstandingReservation( \@ARGV );
my $t = Reservation->OutstandingReservation( \@ARGV,
defined( $type ) ? [ $type ] :
undef );
if( defined( $t ) ) {
print strftime( "%Y-%m-%d %H:%M\n", localtime( $t ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment