Skip to content

Commit ee9aea9

Browse files
authored
ref: Retry wal2json download in installer (#1881)
Retry curl calls with exponential backoff.
1 parent 8bc4017 commit ee9aea9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

install/install-wal2json.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ FILE_NAME="wal2json-Linux-$ARCH-glibc.so"
77
docker_curl() {
88
# The environment variables can be specified in lower case or upper case.
99
# The lower case version has precedence. http_proxy is an exception as it is only available in lower case.
10-
docker run --rm -e http_proxy -e https_proxy -e HTTPS_PROXY -e no_proxy -e NO_PROXY curlimages/curl:7.77.0 "$@"
10+
docker run --rm -e http_proxy -e https_proxy -e HTTPS_PROXY -e no_proxy -e NO_PROXY curlimages/curl:7.77.0 \
11+
--connect-timeout 5 \
12+
--max-time 10 \
13+
--retry 5 \
14+
--retry-delay 0 \
15+
--retry-max-time 60 \
16+
"$@"
1117
}
1218

1319
if [[ $WAL2JSON_VERSION == "latest" ]]; then
@@ -16,7 +22,6 @@ if [[ $WAL2JSON_VERSION == "latest" ]]; then
1622
grep '"tag_name":' |
1723
sed -E 's/.*"([^"]+)".*/\1/'
1824
)
19-
2025
if [[ ! $VERSION ]]; then
2126
echo "Cannot find wal2json latest version"
2227
exit 1

0 commit comments

Comments
 (0)