コード例 #1
0
ファイル: database.py プロジェクト: brunobord/redis-limpyd
 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
ファイル: database.py プロジェクト: pombredanne/redis-limpyd
 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]