commit ffde535388f2996a9adccdccc75a22a0176d0d35 Author: Damian Johnson atagar@torproject.org Date: Thu Dec 13 22:56:17 2012 -0800
Republishing --repeat should... well, repeat
Forgot to make the script continually run when --repeat was provided. --- docs/republish | 1 + docs/republish.py | 17 +++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/docs/republish b/docs/republish index f8658f1..246a38c 100755 --- a/docs/republish +++ b/docs/republish @@ -4,4 +4,5 @@ export PATH=/home/stem/bin:$PATH export PYTHONPATH=/home/stem/lib/python
python /home/stem/stem/docs/republish.py $* +disown -h
diff --git a/docs/republish.py b/docs/republish.py index ccd7ae1..180863c 100644 --- a/docs/republish.py +++ b/docs/republish.py @@ -73,14 +73,15 @@ if __name__ == '__main__': if repeat_rate: latest_run = 0 # unix timestamp for when we last ran
- while time.time() < (latest_run + repeat_rate * 60): - time.sleep(15) - - try: - latest_run = time.time() - republish_site() - except OSError, exc: - LOGGER.log(logging.WARN, str(exc)) + while True: + while time.time() < (latest_run + repeat_rate * 60): + time.sleep(15) + + try: + latest_run = time.time() + republish_site() + except OSError, exc: + LOGGER.log(logging.WARN, str(exc)) else: republish_site()
tor-commits@lists.torproject.org