From: Andrew Dunstan Date: Wed, 13 Oct 2010 16:04:06 +0000 (+0000) Subject: remove unnecessary build_status_latest processing - we already have a latest_snapshot... X-Git-Url: https://git.exim.org/buildfarm-server.git/commitdiff_plain/115c688c05bf45e5265a43e6f54ceacbdd1713e8 remove unnecessary build_status_latest processing - we already have a latest_snapshot table maintined by trigger --- diff --git a/cgi-bin/pgstatus.pl b/cgi-bin/pgstatus.pl index 8cafc4c..c046b92 100755 --- a/cgi-bin/pgstatus.pl +++ b/cgi-bin/pgstatus.pl @@ -340,33 +340,6 @@ $row=$sth->fetchrow_arrayref; my ($os, $compiler,$arch) = @$row; $sth->finish; -$db->begin_work; -my $have_status = $db->selectrow_arrayref( q{ - select 1 - from build_status_latest - where sysname = ? and branch = ? -}, - undef, $animal, $branch); -if ($have_status) -{ - $db->do(q{ - update build_status_latest - set latest_snapshot = ? - where sysname = ? and branch = ? - }, - undef, $dbdate, $animal, $branch); -} -else -{ - $db->do(q{ - insert into build_status_latest - (sysname, branch, latest_snapshot) - values (?,?,?) - }, - undef, $animal, $branch, $dbdate); -} -$db->commit; - $db->begin_work; $db->do("delete from dashboard_mat"); $db->do("insert into dashboard_mat select * from dashboard_mat_data2"); diff --git a/cgi-bin/show_members.pl b/cgi-bin/show_members.pl index 61c621a..58039d5 100755 --- a/cgi-bin/show_members.pl +++ b/cgi-bin/show_members.pl @@ -36,8 +36,8 @@ my $statement = q{ select name, operating_system, os_version, compiler, compiler_version, owner_email, architecture as arch, ARRAY( select branch || ':' || - extract(days from now() - latest_snapshot) - from build_status_latest l + extract(days from now() - l.snapshot) + from latest_snapshot l where l.sysname = s.name order by branch <> 'HEAD', branch desc ) as branches,