remove unnecessary build_status_latest processing - we already have a latest_snapshot...
authorAndrew Dunstan <andrew@dunslane.net>
Wed, 13 Oct 2010 16:04:06 +0000 (16:04 +0000)
committerAndrew Dunstan <andrew@dunslane.net>
Wed, 13 Oct 2010 16:04:06 +0000 (16:04 +0000)
cgi-bin/pgstatus.pl
cgi-bin/show_members.pl

index 8cafc4c8e5c7f80764dbab6a908b746f723c2c8b..c046b92b05fbf39f2492972588b6d937aad65667 100755 (executable)
@@ -340,33 +340,6 @@ $row=$sth->fetchrow_arrayref;
 my ($os, $compiler,$arch) = @$row;
 $sth->finish;
 
 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");
 $db->begin_work;
 $db->do("delete from dashboard_mat");
 $db->do("insert into dashboard_mat select * from dashboard_mat_data2");
index 61c621ae0bf6cf0657d8e449ac3964b073b5594c..58039d558ac3565ce8eff274bfbbf5024aaf79d7 100755 (executable)
@@ -36,8 +36,8 @@ my $statement = q{
   select name, operating_system, os_version, compiler, compiler_version, owner_email, 
     architecture as arch, ARRAY(
                                select branch || ':' || 
   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, 
                                where l.sysname = s.name
                                order by branch <> 'HEAD', branch desc 
                                ) as branches,