Support selecting a compression type when exporting a project.

This commit is contained in:
grossmj
2019-03-07 17:05:32 +07:00
parent af80b0bb6e
commit 0ae66a2608
3 changed files with 20 additions and 22 deletions

View File

@ -96,6 +96,7 @@ class Snapshot:
try:
begin = time.time()
with tempfile.TemporaryDirectory() as tmpdir:
# Do not compress the snapshots
with aiozipstream.ZipFile(compression=zipfile.ZIP_STORED) as zstream:
await export_project(zstream, self._project, tmpdir, keep_compute_id=True, allow_all_nodes=True)
async with aiofiles.open(self.path, 'wb') as f: