No searching my DB... too much load, and I don't have any useful cache IDs to avoid recalculating everything.
authorBenjamin Smedberg <benjamin@smedbergs.us>
Fri, 17 Jul 2009 16:17:27 -0400
changeset 19 f2f8dbf94a36
parent 18 725708beeed3
child 20 5c4f22089101
child 23 8894b0ca1189
push id12
push userbsmedberg@mozilla.com
push date2009-07-17 20:17 +0000
No searching my DB... too much load, and I don't have any useful cache IDs to avoid recalculating everything.
warning-ui/ui.py
--- a/warning-ui/ui.py
+++ b/warning-ui/ui.py
@@ -25,16 +25,22 @@ class Root(object):
                               GROUP BY buildnumber) AS uwarnings
                            ON builds.buildnumber = uwarnings.buildnumber
                            ORDER BY builds.buildnumber DESC LIMIT 100''')
             return self.render('index.html', builds=cur.fetchall())
         finally:
             cur.close()
 
     @cherrypy.expose
+    def robots_txt(self):
+        cherrypy.response.headers['Content-Type'] = 'text/plain'
+        return """User-agent: *
+Disallow: /"""
+
+    @cherrypy.expose
     def new(self, end=-1, span=100):
         end = int(end)
         span = int(span)
 
         cur = self.dbcursor()
         if end == -1:
             cur.execute('''SELECT max(builds.buildnumber)
                            FROM builds''')