if ($1 eq 'f') {
$limit .= "AND Job.JobStatus IN ('f','E') ";
} elsif ($1 eq 'W') {
- $limit .= "AND Job.JobStatus = 'T' AND Job.JobErrors > 0 ";
+ $limit .= "AND Job.JobStatus IN ('T', 'W') OR Job.JobErrors > 0 ";
} else {
$limit .= "AND Job.JobStatus = '$1' ";
}
FROM Job JOIN client_group_member ON (Job.ClientId = client_group_member.ClientId)
JOIN client_group USING (client_group_id)
- WHERE Type IN ('B', 'R') AND JobStatus = 'T'
+ WHERE Type IN ('B', 'R') AND JobStatus IN ('T', 'W')
$where
$limit
) AS jobok USING (client_group_name) LEFT JOIN
JOIN Client USING (ClientId) $filter
JOIN Status USING (JobStatus)
WHERE client_group_name IN ($arg->{jclient_groups})
- AND JobStatus IN ('T', 'f', 'A', 'e', 'E')
+ AND JobStatus IN ('T', 'W', 'f', 'A', 'e', 'E')
$limit $filter2
GROUP BY Client.Name, date
) AS sub JOIN Status USING (severity)
JOIN client_group_member USING (ClientId)
JOIN client_group USING (client_group_id) $filter3
JOIN Status USING (JobStatus)
- WHERE JobStatus IN ('T', 'f', 'A', 'e', 'E')
+ WHERE JobStatus IN ('T', 'W', 'f', 'A', 'e', 'E')
$filter1 $filter2
GROUP BY client_group_name, date
) AS sub JOIN Status USING (severity)
FROM Job
WHERE Job.Name = '$job'
AND Job.Level = 'F'
- AND Job.JobStatus = 'T'
+ AND Job.JobStatus IN ('T', 'W')
ORDER BY Job.StartTime DESC LIMIT 1
) ";
}
FROM Job INNER JOIN Client USING (ClientId) $filter
WHERE Job.Name = '$job'
AND Job.Level = '$level'
- AND Job.JobStatus = 'T'
+ AND Job.JobStatus IN ('T', 'W')
$filter2
ORDER BY StartTime DESC
LIMIT 4
count(1) AS nb_job, client_group_name
FROM $jobt AS Job JOIN client_group_member USING (ClientId)
JOIN client_group USING (client_group_id) $filter
- WHERE JobStatus = 'T' AND Type IN ('M', 'B', 'g')
+ WHERE JobStatus IN ('T', 'W') AND Type IN ('M', 'B', 'g')
$where $limit
GROUP BY client_group_name ORDER BY client_group_name
SELECT count(1) AS nb_resto, client_group_name
FROM $jobt AS Job JOIN client_group_member USING (ClientId)
JOIN client_group USING (client_group_id)
- WHERE JobStatus = 'T' AND Type = 'R'
+ WHERE JobStatus IN ('T','W') AND Type = 'R'
$where $limit
GROUP BY client_group_name ORDER BY client_group_name
my ($self, $ouput) = @_;
my %arg;
+ $self->debug($ouput);
foreach my $l (split(/\r?\n/, $ouput)) {
+ $self->debug($l);
if ($l =~ /(\w+): name=([\w\d\.\s-]+?)(\s+\w+=.+)?$/) {
$arg{$1} = $2;
$l = $3
foreach my $k (keys %arg) {
$lowcase{lc($k)} = $arg{$k} ;
}
+ $self->debug(\%lowcase);
return \%lowcase;
}
AND Job.StartTime < '$end'
AND Job.Name = '$job'
AND Job.Type = '$type'
- AND Job.JobStatus = 'T'
+ AND Job.JobStatus IN ('T', 'W')
AND Job.Level IN ($l)
" . ($pool?" AND Pool.Name = '$pool' ":'') . "
AND Client.Name = '$client'