Compare commits
2 Commits
4ea3b28081
...
39f01b266f
| Author | SHA1 | Date | |
|---|---|---|---|
|
39f01b266f
|
|||
|
31c3f7d438
|
@@ -28,7 +28,7 @@ def archive_repo(source: Path, target_dir: Path, dry_run: bool) -> Path:
|
|||||||
return archive_path
|
return archive_path
|
||||||
|
|
||||||
with open(archive_path, "wb") as f:
|
with open(archive_path, "wb") as f:
|
||||||
cctx = zstandard.ZstdCompressor(level=20)
|
cctx = zstandard.ZstdCompressor(level=20, threads=-1)
|
||||||
with cctx.stream_writer(f) as compressor:
|
with cctx.stream_writer(f) as compressor:
|
||||||
with tarfile.open(fileobj=compressor, mode="w|") as tar:
|
with tarfile.open(fileobj=compressor, mode="w|") as tar:
|
||||||
tar.add(source, arcname=source.name)
|
tar.add(source, arcname=source.name)
|
||||||
@@ -70,6 +70,9 @@ def run(
|
|||||||
if category and cat.config.name not in category:
|
if category and cat.config.name not in category:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if cat.config.days == 0 or cat.config.days is None:
|
||||||
|
continue
|
||||||
|
|
||||||
limit_days = cat.config.days if cat.config.days is not None else older_than
|
limit_days = cat.config.days if cat.config.days is not None else older_than
|
||||||
|
|
||||||
for repo in cat.repos:
|
for repo in cat.repos:
|
||||||
|
|||||||
Reference in New Issue
Block a user