This allows us to separate out `preparing' jobs into ones which are in
our data plan and ones which are not. The ones which are not may not
have quite started to run ts-hosts-allocate, or may still be in the
planning queue and not made it into the projection.
In either case we don't have an estimated finish time for them.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
END
for my $row (@{$stats}) {
my ($job,$stat) = @$row;
+ if ($stat eq 'preparing') {
+ $stat = %{ $f->{Jobs}{$job}{Reso} } ? 'prep.alloc.' : 'preparing';
+ }
$f->{Stats}{lc($stat)}++;
$global_stats{lc($stat)}++;
}
my %so = (
queued => 1,
preparing => 2,
- blocked => 3,
- running => 4,
- pass => 5,
- fail => 6,
- broken => 7,
+ 'prep.alloc.' => 3,
+ blocked => 4,
+ running => 5,
+ pass => 6,
+ fail => 7,
+ broken => 8,
);
return sort { ($so{$a}//0) <=> ($so{$b}//0) } (keys %{$stats});
}