From 0020881dc68a90ea91971882beb315bd674dfe69 Mon Sep 17 00:00:00 2001 From: Kirill Miazine Date: Tue, 3 Apr 2018 23:44:42 +0200 Subject: [PATCH] Database: do not mess with databas for ncrecent_failures view --- cgi-bin/eximstatus.pl | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/cgi-bin/eximstatus.pl b/cgi-bin/eximstatus.pl index d2e4638..e471c92 100755 --- a/cgi-bin/eximstatus.pl +++ b/cgi-bin/eximstatus.pl @@ -447,15 +447,16 @@ $db->do("delete from dashboard_mat"); $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 '90 days'"); - $db->commit; -} + +#if ($stage ne 'OK') # On Exim build farm nrecent_failures is a view, not table... comment out +#{ +# $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 '90 days'"); +# $db->commit; +#} $db->disconnect; -- 2.30.2