Пример #1
0
 def _check_cache_state(self):
     from utils import getmc
     app_log.debug("start memcached state check thread")
     while 1:
         try:
             client = getmc()
             client.get_stats()
             app_log.debug("memcached come back!")
             self._evthub.emit_system_notify("cacheserver.up", "")
             break
         except:
             app_log.warn("memcached still down!")
         time.sleep(5)
Пример #2
0
def get_proxy_mc():
    # cache_pool = CacheConnectionPool.instance()
    # raw_mc = cache_pool.get_connection()
    from utils import getmc
    return CacheConnectionProxy(getmc())
Пример #3
0
def install_cache_pool():
    from utils import getmc
    context['mc'] = getmc()
Пример #4
0
 def _create_raw_connection(self):
     from utils import getmc
     return getmc()
Пример #5
0
def test_mc():
    from utils import getmc
    client = getmc()
    print client
    print client.get_stats()