From 730e542b48992497f708fe64ae58113aab19761a Mon Sep 17 00:00:00 2001 From: dramforever Date: Fri, 6 Mar 2020 23:32:00 +0800 Subject: [PATCH] nix-channels: Larger batch size and configurable --- nix-channels.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix-channels.py b/nix-channels.py index 9dc23fd..427cae0 100644 --- a/nix-channels.py +++ b/nix-channels.py @@ -26,6 +26,8 @@ else: MIRROR_BASE_URL = os.getenv("MIRROR_BASE_URL", 'https://mirrors.tuna.tsinghua.edu.cn/nix-channels') WORKING_DIR = os.getenv("TUNASYNC_WORKING_DIR", 'working-channels') +PATH_BATCH = int(os.getenv('NIX_MIRROR_PATH_BATCH', 8192)) + STORE_DIR = 'store' RELEASES_DIR = 'releases' CLONE_SINCE = datetime(2018, 12, 1) @@ -290,8 +292,6 @@ def update_channels(channels): # Batch paths to avoid E2BIG - PATH_BATCH = 128 - channel_failure = False for i in range(0, len(paths), PATH_BATCH):