mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 04:12:42 +00:00
nix-channels: Larger batch size and configurable
This commit is contained in:
parent
d00613ee40
commit
730e542b48
@ -26,6 +26,8 @@ else:
|
|||||||
MIRROR_BASE_URL = os.getenv("MIRROR_BASE_URL", 'https://mirrors.tuna.tsinghua.edu.cn/nix-channels')
|
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')
|
WORKING_DIR = os.getenv("TUNASYNC_WORKING_DIR", 'working-channels')
|
||||||
|
|
||||||
|
PATH_BATCH = int(os.getenv('NIX_MIRROR_PATH_BATCH', 8192))
|
||||||
|
|
||||||
STORE_DIR = 'store'
|
STORE_DIR = 'store'
|
||||||
RELEASES_DIR = 'releases'
|
RELEASES_DIR = 'releases'
|
||||||
CLONE_SINCE = datetime(2018, 12, 1)
|
CLONE_SINCE = datetime(2018, 12, 1)
|
||||||
@ -290,8 +292,6 @@ def update_channels(channels):
|
|||||||
|
|
||||||
# Batch paths to avoid E2BIG
|
# Batch paths to avoid E2BIG
|
||||||
|
|
||||||
PATH_BATCH = 128
|
|
||||||
|
|
||||||
channel_failure = False
|
channel_failure = False
|
||||||
|
|
||||||
for i in range(0, len(paths), PATH_BATCH):
|
for i in range(0, len(paths), PATH_BATCH):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user