예제 #1
0
 def connection(self):
     """
     A simple property on the instance that return the connection stored on
     the class
     """
     if not self._connection:
         self._connection = redis_connect(self.connection_settings)
     return self._connection
예제 #2
0
 def connection(self):
     """
     A simple property on the instance that return the connection stored on
     the class
     """
     if not self._connection:
         self._connection = redis_connect(self.connection_settings)
     return self._connection
예제 #3
0
파일: base.py 프로젝트: liberation/sulci
 def connection(self):
     db_name = config.get_current_db_name()
     if not db_name in self._connections:
         self._connections[db_name] = redis_connect(config.DATABASES[db_name])
     return self._connections[db_name]
예제 #4
0
파일: base.py 프로젝트: yohanboniface/sulci
 def connection(self):
     db_name = config.get_current_db_name()
     if not db_name in self._connections:
         self._connections[db_name] = redis_connect(
             config.DATABASES[db_name])
     return self._connections[db_name]