qualify ordery_by clauses when necessary, remove unnecessary order_by's, reported by Ludo, resulted in errors in sqlite

This commit is contained in:
Rob Vermaas
2011-04-01 07:40:06 +00:00
parent ffa4ba3b9e
commit fca3019c7b
3 changed files with 54 additions and 54 deletions

View File

@ -46,12 +46,12 @@ foreach my $project ($db->resultset('Projects')->all) {
print STDERR "*** skipping disabled jobset ", $project->name, ":", $jobset->name, "\n";
next;
}
if ($keepnr <= 0 ) {
print STDERR "*** jobset ", $project->name, ":", $jobset->name, " set to keep 0 builds\n";
next;
}
# Go over all jobs in this jobset.
foreach my $job ($jobset->jobs->all) {
print STDERR "*** looking for builds to keep in job ",
@ -69,7 +69,7 @@ foreach my $project ($db->resultset('Projects')->all) {
, system => $system->system
},
{ join => 'resultInfo'
, order_by => 'id DESC'
, order_by => 'me.id DESC'
, rows => $keepnr
});
keepBuild $_ foreach @recentBuilds;