This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I'm starting with a clean CentoOS 6.5 install on Rackspace Cloud (which includes EPEL by default.) | |
# Install yum packages | |
# TODO: Install Python stuff into virtualenv rather than from yum packages | |
yum -y install python-whisper python-carbon graphite-web python-memcached python-ldap httpd memcached python-bucky | |
# ===== BEGIN MANUAL STEP ===== | |
# run syncdb to setup the db and prime the authentication model (if you're using the DB model) | |
python /usr/lib/python2.6/site-packages/graphite/manage.py syncdb | |
# ===== END MANUAL STEP ===== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
class Retry(object): | |
default_exceptions = (Exception) | |
def __init__(self, tries, exceptions=None, delay=0): | |
""" | |
Decorator for retrying function if exception occurs | |
tries -- num tries | |
exceptions -- exceptions to catch |