Add a more concise queue page

The old page didn't scale very well if you have 150K builds in the
queue, in fact it tended to make browsers hang. The new one just
shows, for each jobset, the number of queued builds. The actual builds
can be seen by going to the corresponding jobset page and looking at
the evals.
This commit is contained in:
Eelco Dolstra
2016-03-08 19:44:51 +01:00
parent b77a43b83d
commit 49a4639377
3 changed files with 45 additions and 1 deletions

View File

@ -102,6 +102,17 @@ sub queue_GET {
}
sub queue_summary :Local :Path('queue-summary') :Args(0) {
my ($self, $c) = @_;
$c->stash->{template} = 'queue-summary.tt';
$c->stash->{queued} = $c->model('DB')->schema->storage->dbh->selectall_arrayref(
"select project, jobset, count(*) as queued, min(timestamp) as oldest, max(timestamp) as newest from Builds " .
"where finished = 0 group by project, jobset order by queued desc",
{ Slice => {} });
}
sub status :Local :Args(0) :ActionClass('REST') { }
sub status_GET {