Beispiel #1
0
 def connect(cls):
     """
     Establish a connection to the Redis service (if none exists)
     """
     if cls._pool is None:
         df = UnixConnectionPool("/var/run/redis/redis.sock", poolsize=2, reconnect=False)
         df.addCallback(cls._connected)
         df.addErrback(cls._connection_failed)
         return df
     return cls._pool
Beispiel #2
0
 def _main():
     ucp = UnixConnectionPool()
     ucp.addCallback(testdelete)
     ucp.addCallback(testset)
     #ucp.addCallback(lambda x:testget(None, x))
     ucp.addErrback(eb)
Beispiel #3
0
 def _main():
     ucp = UnixConnectionPool()
     ucp.addCallback(testdelete)
     ucp.addCallback(testset)
     #ucp.addCallback(lambda x:testget(None, x))
     ucp.addErrback(eb)