Exemplo n.º 1
0
 def __init__(self, statedir):
     Thread.__init__(self, name="HostCache")
     self._ip2i = IPResolver(cachedir=statedir, maxtime=15)
     self._cv = Condition()
     self._stopme = False
     self._requests = []
     self._last_purge = time.time()
     self._signals = map(lambda x: Condition(), xrange(0, self._NUM_SIGS))
     cherrypy.engine.subscribe('start', self.start)
     cherrypy.engine.subscribe('stop', self.stop, priority=100)