github actions: upload delays 30s, retries 3
Do less retries but with higher delay. Previous config didn't work.
This commit is contained in:
parent
6d9e53b510
commit
b8b89471f5
16
.github/workflows/packages.yml
vendored
16
.github/workflows/packages.yml
vendored
@ -223,9 +223,9 @@ jobs:
|
|||||||
if [ "$uploaded_files" = "true" ]; then
|
if [ "$uploaded_files" = "true" ]; then
|
||||||
echo "[$(date +%H:%M:%S)] Adding packages to repository '$REPOSITORY_NAME'..."
|
echo "[$(date +%H:%M:%S)] Adding packages to repository '$REPOSITORY_NAME'..."
|
||||||
|
|
||||||
# Retry up to 5 times.
|
# Retry up to 3 times.
|
||||||
http_status_code=""
|
http_status_code=""
|
||||||
for _ in {1..10}; do
|
for _ in {1..3}; do
|
||||||
curl_response=$(
|
curl_response=$(
|
||||||
set +e
|
set +e
|
||||||
curl \
|
curl \
|
||||||
@ -239,8 +239,8 @@ jobs:
|
|||||||
http_status_code=$(echo "$curl_response" | cut -d'|' -f2)
|
http_status_code=$(echo "$curl_response" | cut -d'|' -f2)
|
||||||
|
|
||||||
if [ "$http_status_code" = "000" ]; then
|
if [ "$http_status_code" = "000" ]; then
|
||||||
echo "[$(date +%H:%M:%S)] Warning: server/proxy has dropped connection, retrying in 10s (adding packages)..."
|
echo "[$(date +%H:%M:%S)] Warning: server/proxy has dropped connection, retrying in 30s (adding packages)..."
|
||||||
sleep 10
|
sleep 30
|
||||||
continue
|
continue
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
@ -264,9 +264,9 @@ jobs:
|
|||||||
|
|
||||||
# Final part to make changes appear in web root.
|
# Final part to make changes appear in web root.
|
||||||
echo "[$(date +%H:%M:%S)] Publishing repository changes..."
|
echo "[$(date +%H:%M:%S)] Publishing repository changes..."
|
||||||
# Retry up to 5 times.
|
# Retry up to 3 times.
|
||||||
http_status_code=""
|
http_status_code=""
|
||||||
for _ in {1..10}; do
|
for _ in {1..3}; do
|
||||||
curl_response=$(
|
curl_response=$(
|
||||||
set +e
|
set +e
|
||||||
curl \
|
curl \
|
||||||
@ -282,8 +282,8 @@ jobs:
|
|||||||
http_status_code=$(echo "$curl_response" | cut -d'|' -f2)
|
http_status_code=$(echo "$curl_response" | cut -d'|' -f2)
|
||||||
|
|
||||||
if [ "$http_status_code" = "000" ]; then
|
if [ "$http_status_code" = "000" ]; then
|
||||||
echo "[$(date +%H:%M:%S)] Warning: server/proxy has dropped connection, retrying in 10s (publishing changes)..."
|
echo "[$(date +%H:%M:%S)] Warning: server/proxy has dropped connection, retrying in 30s (publishing changes)..."
|
||||||
sleep 10
|
sleep 30
|
||||||
continue
|
continue
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
|
Loading…
x
Reference in New Issue
Block a user