git://git.exim.org
/
buildfarm-server.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
855eeb2
)
repopulate failures table when a failure is reported
author
Andrew Dunstan
<andrew@dunslane.net>
Wed, 19 Jan 2011 03:37:14 +0000
(19:37 -0800)
committer
Andrew Dunstan
<andrew@dunslane.net>
Wed, 19 Jan 2011 03:37:14 +0000
(19:37 -0800)
cgi-bin/pgstatus.pl
patch
|
blob
|
history
diff --git
a/cgi-bin/pgstatus.pl
b/cgi-bin/pgstatus.pl
index 52e02df30e74896cf63751783c175ec0cf219276..0c60f80793f43a81e9050f110383ef3f23e9da32 100755
(executable)
--- a/
cgi-bin/pgstatus.pl
+++ b/
cgi-bin/pgstatus.pl
@@
-401,6
+401,16
@@
$db->do("delete from dashboard_mat");
$db->do("insert into dashboard_mat select * from dashboard_mat_data");
$db->commit;
$db->do("insert into dashboard_mat select * from dashboard_mat_data");
$db->commit;
+if ($stage ne 'OK')
+{
+ $db->begin_work;
+ # prevent occasional duplication by forcing serialization of this operation
+ $db->do("lock table nrecent_failures in share row exclusive mode");
+ $db->do("delete from nrecent_failures");
+ $db->do("insert into nrecent_failures select bs.sysname, bs.snapshot, bs.branch from build_status bs where bs.stage <> 'OK' and bs.snapshot > now() - interval '30 days'");
+ $db->commit;
+}
+
$db->disconnect;
print "Content-Type: text/plain\n\n";
$db->disconnect;
print "Content-Type: text/plain\n\n";