send-reports: Truncate content to 50K. master
authorRichard W.M. Jones <rjones@redhat.com>
Fri, 7 Jul 2017 14:00:14 +0000 (15:00 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Fri, 7 Jul 2017 14:01:07 +0000 (15:01 +0100)
README
send-reports.py

diff --git a/README b/README
index 2e67f3f..954c227 100644 (file)
--- a/README
+++ b/README
@@ -99,6 +99,9 @@ To do:
  - Allow dependencies between tests (ie. test if the code compiles
    first before running other tests).
 
+ - Send full reports to a website.  Requires another queue and another
+   task to update the website.
+
 Similar projects:
 
  - The 0-day test service is a very comprehensive set of tests
index b526683..122765f 100755 (executable)
@@ -34,6 +34,11 @@ while True:
     if config.reply_override is not None:
         to = [config.reply_override]
 
+    # If the content is over 50K then truncate it to the last 50K.
+    # XXX Upload full logs to a website.
+    if len(content) > 50000:
+        content = content[-50000:]
+
     # Construct an email of type text/plain with the body of the
     # message.
     msg = MIMEText(content)