Beispiel #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
Beispiel #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
Beispiel #3
0
 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]
Beispiel #4
0
 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]