[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Logging site republication runtime



commit 9a1601db33f58b044aa2375db8f97f364bdd849c
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Fri Dec 14 09:12:48 2012 -0800

    Logging site republication runtime
    
    Again, mostly a commit to exercise that site republication is now working with
    a cron setup.
---
 docs/republish.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/docs/republish.py b/docs/republish.py
index 1d2d249..118ea3f 100644
--- a/docs/republish.py
+++ b/docs/republish.py
@@ -41,10 +41,13 @@ def republish_site():
   # we'd use plumbing commands to check this but... meh. Patches welcome.
   
   if 'Already up-to-date.' not in run('git pull', cwd = '/home/stem/stem'):
+    start_time = time.time()
     LOGGER.log(logging.INFO, "Stem's repository has changed. Republishing...")
     run('make html', cwd = '/home/stem/stem/docs')
     run('sudo -u mirroradm static-master-update-component stem.torproject.org')
-    LOGGER.log(logging.INFO, "  site republished")
+    
+    runtime = int(time.time() - start_time)
+    LOGGER.log(logging.INFO, "  site republished (took %s seconds)" % runtime)
 
 if __name__ == '__main__':
   try: 

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits