def connect_to_redis():
 global _connection_pool
 if (_connection_pool is None):
  url = config.get(REDIS_URL_SETTING_NAME, REDIS_URL_DEFAULT_VALUE)
  log.debug(u'Using Redis at {}'.format(url))
  _connection_pool = ConnectionPool.from_url(url)
 return Redis(connection_pool=_connection_pool)

def connect_to_redis ( ) : global _connection_pool if ( _connection_pool is None ) : url = config . get ( REDIS_URL_SETTING_NAME , REDIS_URL_DEFAULT_VALUE ) log . debug ( u'Using Redis at {}' . format ( url ) ) _connection_pool = ConnectionPool . from_url ( url ) return Redis ( connection_pool = _connection_pool )
connect to redis .