change the connection option for pub-mirror

This commit is contained in:
root 2020-02-13 21:16:57 +08:00
parent e97393b71d
commit 93887406eb

4
pub.sh
View File

@ -3,5 +3,5 @@ set -e
BASE_URL=${MIRROR_BASE_URL:-"https://mirrors.tuna.tsinghua.edu.cn/dart-pub"}
UPSTREAM_URL=${TUNASYNC_UPSTREAM_URL:-"https://pub.dartlang.org/api"}
/pub-cache/bin/pub_mirror --upstream $UPSTREAM_URL --verbose --connections 1 --concurrency 10 "$TUNASYNC_WORKING_DIR" "$BASE_URL"
echo "From $UPSTREAM_URL to $BASE_URL"
exec /pub-cache/bin/pub_mirror --upstream "$UPSTREAM_URL" --verbose --connections 10 --concurrency 10 "$TUNASYNC_WORKING_DIR" "$BASE_URL"