From c79148509948df715820c669554910c26a612ac0 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Fri, 22 Jan 2010 10:29:54 +0000 Subject: [PATCH] * hydra: show queue optimization --- src/lib/Hydra/Controller/Root.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Hydra/Controller/Root.pm b/src/lib/Hydra/Controller/Root.pm index 16d6f1c8..3e56cf6e 100644 --- a/src/lib/Hydra/Controller/Root.pm +++ b/src/lib/Hydra/Controller/Root.pm @@ -58,7 +58,7 @@ sub queue :Local { my ($self, $c) = @_; $c->stash->{template} = 'queue.tt'; $c->stash->{queue} = [$c->model('DB::Builds')->search( - {finished => 0}, {join => 'schedulingInfo', order_by => ["priority DESC", "timestamp"]})]; + {finished => 0}, {join => ['schedulingInfo', 'project'] , order_by => ["priority DESC", "timestamp"], '+select' => ['project.enabled', 'schedulingInfo.priority', 'schedulingInfo.disabled', 'schedulingInfo.busy'], '+as' => ['enabled', 'priority', 'disabled', 'busy'] })]; $c->stash->{flashMsg} = $c->flash->{buildMsg}; }