Skip to content

Commit 710082e

Browse files
authored
Update lint_urls.sh
1 parent 800b527 commit 710082e

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

scripts/lint_urls.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ while IFS=: read -r filepath url; do
3232
https://check-host.net/check-http \
3333
| jq -r .request_id) || request_id=""
3434
if [ -n "$request_id" ]; then
35-
sleep 3
36-
for _ in {1..10}; do
35+
sleep 5
36+
for _ in {1..5}; do
3737
new_code=$(curl -sS -H 'Accept: application/json' \
3838
"https://check-host.net/check-result/$request_id" \
3939
| jq -r -e '.[][0][3]') || new_code=000
@@ -42,7 +42,7 @@ while IFS=: read -r filepath url; do
4242
code=$new_code
4343
break
4444
fi
45-
sleep 3
45+
sleep 5
4646
done
4747
fi
4848
fi
@@ -78,11 +78,7 @@ done < <(
7878
)
7979

8080
for pid in "${pids[@]}"; do
81-
if ! wait "$pid" 2>/dev/null; then
82-
if [ $? -eq 1 ]; then
83-
status=1
84-
fi
85-
fi
81+
wait "$pid" 2>/dev/null || [[ $? -eq 1 ]] && status=1
8682
done
8783

8884
exit $status

0 commit comments

Comments
 (0)