[Piuparts-commits] rev 263 - piatti/home/piupartsm trunk

Holger Levsen holger at alioth.debian.org
Mon Mar 16 14:21:43 UTC 2009


Author: holger
Date: 2009-03-16 14:21:43 +0000 (Mon, 16 Mar 2009)
New Revision: 263

Modified:
   piatti/home/piupartsm/crontab
   trunk/piuparts-report.py
Log:
only gerate reports four times a day

Modified: piatti/home/piupartsm/crontab
===================================================================
--- piatti/home/piupartsm/crontab	2009-03-16 14:01:36 UTC (rev 262)
+++ piatti/home/piupartsm/crontab	2009-03-16 14:21:43 UTC (rev 263)
@@ -5,7 +5,8 @@
 #
 @reboot ddate | mail -s "piatti rebooted, please restart the piuparts-slave screen session"  piuparts-devel at lists.alioth.debian.org
 #
-# create reports every hour
+# create reports every six hour
+#  (dinstall runs 1|7|13|19:52, so this is long after mirror pushes...)
 #
-42 * * * * PYTHONPATH=/org/piuparts.debian.org/lib/python2.4/site-packages:/org/piuparts.debian.org/lib/python2.5/site-packages nice python /org/piuparts.debian.org/share/piuparts/piuparts-report.py > ~piupartsm/reports.log
+42 4,10,16,22 * * * PYTHONPATH=/org/piuparts.debian.org/lib/python2.4/site-packages:/org/piuparts.debian.org/lib/python2.5/site-packages nice python /org/piuparts.debian.org/share/piuparts/piuparts-report.py > ~piupartsm/reports.log
 

Modified: trunk/piuparts-report.py
===================================================================
--- trunk/piuparts-report.py	2009-03-16 14:01:36 UTC (rev 262)
+++ trunk/piuparts-report.py	2009-03-16 14:21:43 UTC (rev 263)
@@ -154,7 +154,7 @@
    planned. Join #debian-qa if you want to help.
  </p>
 
- <p>These pages are updated every hour.</p>
+ <p>These pages are updated every six hours. Last update: %(time)s </p>
 </div>
 """
 
@@ -421,16 +421,18 @@
         report_config.read(CONFIG_FILE)
         section_names = report_config["sections"].split()
 
-    logging.debug("Writing index page")
-    write_file(report_config["index-page"],
-        HTML_HEADER + INDEX_BODY_TEMPLATE + HTML_FOOTER)
-
     sections = []
     for section_name in section_names:
         section = Section(section_name)
         section.output()
         sections.append(section)
 
+    logging.debug("Writing index page")
+    write_file(report_config["index-page"],
+        HTML_HEADER + INDEX_BODY_TEMPLATE % 
+            {
+                "time": time.strftime("%Y-%m-%d %H:%M:%S %z"),
+            } + HTML_FOOTER)
 
 if __name__ == "__main__":
     main()




More information about the Piuparts-commits mailing list