LEFT JOIN steps
USING (flight,job)
WHERE flight= ?
+ AND job LIKE ?
GROUP BY job, jobs.status
END
return $optimist->{Got};
}
-sub starving ($$) {
- my ($best_start_abs, $now) = @_;
+sub starving ($$$) {
+ my ($best_start_abs, $now, $thisclass) = @_;
return (0, 'runvar says never give up') unless %$starvation_p;
return (0, 'no estimate') unless defined $best_start_abs;
- $starvation_q->execute($flight);
+ my $joblike = $thisclass ? ($job =~ s/(?:(-)|\W).*/$1\%/r) : '%';
+ $starvation_q->execute($flight, $joblike);
my $d=0;
my $w=0;
my $maxfin=0;
}
} elsif (%$starvation_p) {
my $est_abs = most_optimistic($best, $now, $starvation_p->{I});
- my ($starving, $m) = starving($est_abs, $now);
+ my ($starving, $m) = starving($est_abs, $now, 0);
$starvation_q->finish();
if (!$starving) {
print DEBUG "not starving: $m\n";