예제 #1
0
  def __init__(self, redis_instance=None, rootkey='counters'):
    if hasattr(BaseCounters, '__init__'):
      BaseCounters.__init__(self)

    self.rootkey = rootkey

    if redis_instance:
      self.redis = redis_instance
    else:
      self.redis = redis.Redis(host='localhost', port=6379, db=0)
예제 #2
0
  def __init__(self):
    if hasattr(BaseCounters, '__init__'):
      BaseCounters.__init__(self)

    self.pings = {}