def connection_pool_class(self):
cls = self.options.get('POOL_CLASS', 'redis.ConnectionPool')
mod_path, cls_name = cls.rsplit('.', 1)
try:
mod = import_object(mod_path)
pool_class = getattr(mod, cls_name)
except (AttributeError, ImportError):
raise ConfigError("Could not find connection pool class '%s'" % cls)
return pool_class
评论列表
文章目录