def create_redis_client(redis_url): client = None try: client = redis.StrictRedis(**parseRedisUrl(redis_url)) client.config_get() # test the connection except Exception as e: client = None return client
def create_redis_client(redis_url): client = None try: client = redis.StrictRedis(**parseRedisUrl(redis_url)) client.config_get() # test the connection except Exception as e: log.warning("Exception trying to connect to redis: {0}".format(e)) client = None return client