* Add some DB indices to make the /releases page much faster.
* Reduce the number of DB queries for the /all and /jobstatus pages. * Show the Hydra version number.
This commit is contained in:
@ -55,7 +55,10 @@ sub getLatestBuilds {
|
||||
foreach my $system ($job->builds->search({}, {select => ['system'], distinct => 1})) {
|
||||
my ($build) = $job->builds->search(
|
||||
{ finished => 1, system => $system->system, %$extraAttrs },
|
||||
{ join => 'resultInfo', order_by => 'timestamp DESC', rows => 1 });
|
||||
{ join => 'resultInfo', order_by => 'timestamp DESC', rows => 1
|
||||
, '+select' => ["resultInfo.releasename", "resultInfo.buildstatus"]
|
||||
, '+as' => ["releasename", "buildstatus"]
|
||||
});
|
||||
push @res, $build if defined $build;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user