From 43f7aaf8b1660bd31a0e6f6b7640682727d8935a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Wed, 18 May 2022 10:12:22 +0200 Subject: [PATCH] nix: limit jobs used by parallel to update Gradle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise on some devices with with good connecitons rate limiting might cause failures to fetch POMs or JARs and in result failing the whole update. Signed-off-by: Jakub SokoĊ‚owski --- nix/deps/gradle/generate.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nix/deps/gradle/generate.sh b/nix/deps/gradle/generate.sh index e1e040ca50..2e4eab8e53 100755 --- a/nix/deps/gradle/generate.sh +++ b/nix/deps/gradle/generate.sh @@ -52,7 +52,8 @@ function gen_deps_json() { # Format URLs into a Nix consumable file. URLS=$(cat ${DEPS_URLS}) - parallel --will-cite --keep-order \ + # Avoid rate limiting by using 4 of the available threads. + parallel --will-cite --keep-order --jobs 4 \ "${CUR_DIR}/url2json.sh" \ ::: ${URLS} \ >> ${DEPS_JSON}