Module Expr Str Import alias Import alias Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad NameLoad attr Str ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias Assign NameStore Str Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Num Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str TryExcept body Assign NameStore Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr With Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A 
@author: mturatti
 N/A logging N/A logging.config N/A N/A N/A N/A logging config fileConfig loggers_redis_monitor.conf N/A logger N/A N/A logging getLogger redis_monitor zktools.locking ZkLock zc.zk ZooKeeper FailedConnect optparse OptionParser redis_failover.redis_monitor RedisMonitor N/A ZOOKEEPER_LOCK redis_monitor_lock N/A LOG_FILE None opt_callback N/A N/A option opt value parser N/A N/A N/A N/A setattr N/A parser values N/A option dest N/A N/A value split , N/A main N/A N/A N/A N/A N/A N/A N/A logger info Enter N/A SLEEP_TIME 300 N/A parser N/A OptionParser N/A N/A N/A parser add_option -z --zkhosts dest zk_hosts type string action callback callback opt_callback help zookeeper list of host:port comma separated  N/A N/A N/A parser add_option -p --path dest zk_path type string help zookeeper root path N/A N/A N/A parser add_option -r --redishosts dest rs_hosts type string action callback callback opt_callback help redis list of host:port comma separated  N/A N/A N/A parser add_option -s --sleeptime dest sleep_time type int help waiting time in seconds between thread execution N/A options N/A N/A N/A parser parse_args N/A 0 N/A N/A options sleep_time N/A N/A SLEEP_TIME N/A options sleep_time N/A N/A N/A logger info SLEEP_TIME: %d SLEEP_TIME N/A N/A N/A logger info Options: %r options N/A N/A N/A logger info Acquiring a exclusive lock on ZooKeeper... N/A N/A N/A zk N/A ZooKeeper N/A N/A , join N/A options zk_hosts N/A N/A ZkLock zk ZOOKEEPER_LOCK N/A N/A N/A N/A logger info Lock acquired! Connecting to Redis... N/A nm N/A RedisMonitor zk N/A options rs_hosts SLEEP_TIME N/A options zk_path N/A N/A N/A nm execute N/A N/A N/A FailedConnect N/A err N/A N/A N/A N/A logger critical err N/A N/A N/A logger info Exit N/A N/A N/A __name__ __main__ N/A N/A N/A main