summaryrefslogtreecommitdiffstats
path: root/sanitycheck.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'sanitycheck.cgi')
-rwxr-xr-xsanitycheck.cgi24
1 files changed, 24 insertions, 0 deletions
diff --git a/sanitycheck.cgi b/sanitycheck.cgi
index c85a3668e..902557bb8 100755
--- a/sanitycheck.cgi
+++ b/sanitycheck.cgi
@@ -583,6 +583,30 @@ if (@badbugs > 0) {
}
###########################################################################
+# Unsent mail
+###########################################################################
+
+Status("Checking for unsent mail");
+
+@badbugs = ();
+
+SendSQL("SELECT bug_id " .
+ "FROM bugs WHERE lastdiffed < delta_ts AND ".
+ "delta_ts < date_sub(now(), INTERVAL 30 minute) ".
+ "ORDER BY bug_id");
+
+while (@row = FetchSQLData()) {
+ my ($id) = (@row);
+ push(@badbugs, $id);
+}
+
+if (@badbugs > 0) {
+ Alert("Bugs that have changes but no mail sent for at least half an hour: " .
+ join (", ", @badbugs));
+ print("Run <code>processmail rescanall</code> to fix this<p>\n");
+}
+
+###########################################################################
# End
###########################################################################