@classmethod
    def create_from_zip(cls, f, version, build_number):
        self = cls(build_number=build_number, version=version, time=datetime.utcnow())
        self.save()

        with ZipFile(f) as z:
            try:
                for name in z.namelist():
                    path = name.split('/')
                    if path[0] == "dist" and path[-1] != "":
                        path = '/'.join(path[1:])
                        self.put_file(z.read(name), path)
            except:
                self.delete()
                raise
        return self
Schedules a new documents for download from batch, and updates score in metadata.
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/builds/models.py/CommCareBuild.create_from_zip--crossover with--dataset/ETHPy150Open scrapinghub/frontera/frontera/core/components.py/Queue.schedule