Increase compression level of tar files being saved in the database
This commit is contained in:
parent
4f4a8b5081
commit
c01b493c99
|
@ -804,7 +804,9 @@ def plugins():
|
|||
|
||||
plugin_content = BytesIO()
|
||||
with tar_open(
|
||||
fileobj=plugin_content, mode="w:gz"
|
||||
fileobj=plugin_content,
|
||||
mode="w:gz",
|
||||
compresslevel=9,
|
||||
) as tar:
|
||||
tar.add(
|
||||
f"/var/tmp/bunkerweb/ui/{temp_folder_name}",
|
||||
|
@ -888,7 +890,9 @@ def plugins():
|
|||
|
||||
plugin_content = BytesIO()
|
||||
with tar_open(
|
||||
fileobj=plugin_content, mode="w:gz"
|
||||
fileobj=plugin_content,
|
||||
mode="w:gz",
|
||||
compresslevel=9,
|
||||
) as tar:
|
||||
tar.add(
|
||||
f"/var/tmp/bunkerweb/ui/{temp_folder_name}",
|
||||
|
@ -956,7 +960,9 @@ def plugins():
|
|||
|
||||
plugin_content = BytesIO()
|
||||
with tar_open(
|
||||
fileobj=plugin_content, mode="w:gz"
|
||||
fileobj=plugin_content,
|
||||
mode="w:gz",
|
||||
compresslevel=9,
|
||||
) as tar:
|
||||
tar.add(
|
||||
f"/var/tmp/bunkerweb/ui/{temp_folder_name}",
|
||||
|
@ -1040,7 +1046,9 @@ def plugins():
|
|||
|
||||
plugin_content = BytesIO()
|
||||
with tar_open(
|
||||
fileobj=plugin_content, mode="w:gz"
|
||||
fileobj=plugin_content,
|
||||
mode="w:gz",
|
||||
compresslevel=9,
|
||||
) as tar:
|
||||
tar.add(
|
||||
f"/var/tmp/bunkerweb/ui/{temp_folder_name}",
|
||||
|
|
|
@ -125,12 +125,10 @@ class Config:
|
|||
|
||||
if with_data:
|
||||
plugin_content = BytesIO()
|
||||
with tar_open(fileobj=plugin_content, mode="w:gz") as tar:
|
||||
tar.add(
|
||||
foldername,
|
||||
arcname=basename(foldername),
|
||||
recursive=True,
|
||||
)
|
||||
with tar_open(
|
||||
fileobj=plugin_content, mode="w:gz", compresslevel=9
|
||||
) as tar:
|
||||
tar.add(foldername, arcname=basename(foldername), recursive=True)
|
||||
plugin_content.seek(0)
|
||||
value = plugin_content.getvalue()
|
||||
|
||||
|
|
Loading…
Reference in New Issue