* Big speed-up of the job status page and the channel generation (such

as the manifest).  The builds are now determined in one SQL query
  rather than a zillion ones.
This commit is contained in:
Eelco Dolstra
2009-04-03 15:37:21 +00:00
parent ca11aba074
commit 16a84f4bf5
10 changed files with 60 additions and 41 deletions

View File

@ -36,7 +36,10 @@ sub index : Chained('jobset') PathPart('') Args(0) {
sub get_builds : Chained('jobset') PathPart('') CaptureArgs(0) {
my ($self, $c) = @_;
$c->stash->{allBuilds} = $c->stash->{jobset}->builds;
$c->stash->{allJobs} = $c->stash->{jobset}->jobs;
$c->stash->{jobStatus} = $c->model('DB')->resultset('JobStatusForJobset')
->search({}, {bind => [$c->stash->{project}->name, $c->stash->{jobset}->name]});
$c->stash->{latestSucceeded} = $c->model('DB')->resultset('LatestSucceededForJobset')
->search({}, {bind => [$c->stash->{project}->name, $c->stash->{jobset}->name]});
$c->stash->{channelBaseName} =
$c->stash->{project}->name . "-" . $c->stash->{jobset}->name;
}