

def generate(self):
    from boto.s3.connection import S3Connection
    self.conn = S3Connection(aws_access_key_id=settings.AWS_ACCESS_KEY, aws_secret_access_key=settings.AWS_SECRET_ACCESS_KEY)
    self.bucket = (self.conn.get_bucket(settings.MEDUSA_AWS_STORAGE_BUCKET_NAME) if settings.MEDUSA_AWS_STORAGE_BUCKET_NAME else self.conn.get_bucket(settings.AWS_STORAGE_BUCKET_NAME))
    self.bucket.configure_website('index.html', '500.html')
    self.server_root_path = self.bucket.get_website_endpoint()
    self.generated_paths = []
    if getattr(settings, 'MEDUSA_MULTITHREAD', False):
        from multiprocessing import Pool
        import itertools
        print('Uploading with up to 10 upload processes...')
        pool = Pool(10)
        path_tuples = pool.map(_s3_render_path, ((None, None, path, None) for path in pool.paths), chunksize=5)
        pool.close()
        pool.join()
        self.generated_paths = list(itertools.chain(*path_tuples))
    else:
        self.client = Client()
        for path in self.paths:
            self.generated_paths += self.render_path(path=path)
    type(self).all_generated_paths += self.generated_paths

dataset/ETHPy150Open mtigas/django-medusa/django_medusa/renderers/s3.py S3StaticSiteRenderer.generate/VarMisuse@153/230 `self`->`pool`