Skip to content
Snippets Groups Projects
Commit 406c3b5f authored by Kristian Klausen's avatar Kristian Klausen :tada:
Browse files

Wait between retrievals to keep load down

Let's try with 0.05s first.
parent 893ce8c1
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
set -o nounset -o errexit -o pipefail
ALBS_PARALLELIZE_DOWNLOAD="${ALBS_PARALLELIZE_DOWNLOAD:-false}"
ALBS_DOWNLOAD_WAIT="${ALBS_DOWNLOAD_WAIT:-0.05}"
ALBS_RANGE_DOWNLOAD_ENABLED="${ALBS_RANGE_DOWNLOAD_ENABLED:-false}"
ALBS_RANGE_DOWNLOAD_CHUNK="${ALBS_RANGE_DOWNLOAD_CHUNK:-$(date +%-d)}"
ALBS_RANGE_DOWNLOAD_CHUNKS="${ALBS_RANGE_DOWNLOAD_CHUNKS:-10}"
......@@ -41,6 +42,7 @@ function _download() {
--max-redirect 0 \
--user-agent="${user_agent}" \
--no-verbose \
--wait="${ALBS_DOWNLOAD_WAIT}" \
--input-file=<(printf "%s\n" "${@:2}") || [[ ${?} = 8 ]] # 8 Server issued an error response.
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment